File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,8 @@ struct awaitable : std::suspend_always {
233233template <worker_context Context>
234234struct join_awaitable {
235235
236+ using except_type = frame_type<Context>::except_type;
237+
236238 frame_type<Context> *frame;
237239
238240 constexpr auto take_stack_and_reset (this join_awaitable self) noexcept -> void {
@@ -310,15 +312,18 @@ struct join_awaitable {
310312 return std::noop_coroutine ();
311313 }
312314
315+ [[noreturn]]
316+ constexpr auto rethrow_exception (this join_awaitable self) -> void {}
317+
313318 constexpr void await_resume (this join_awaitable self) {
314319 // We should have been reset
315320 LF_ASSUME (self.frame ->steals == 0 );
316321 LF_ASSUME (self.frame ->joins == k_u16_max);
317322
323+ // Outside parallel regions so can touch non-atomically.
318324 if constexpr (LF_COMPILER_EXCEPTIONS) {
319- if (self.frame ->exception_bit ) {
320- // TODO: rest exception but as part of handling
321- LF_THROW (std::runtime_error{" Child task threw an exception" });
325+ if (self.frame ->exception_bit ) [[unlikely]] {
326+ self.rethrow_exception ();
322327 }
323328 }
324329 }
You can’t perform that action at this time.
0 commit comments