Skip to content

Commit

Permalink
Aync(...) exception behavior corrected.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnbrq committed Oct 19, 2023
1 parent 4329a95 commit bcc9651
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/cxxdes/core/impl/async.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ struct async_functor {

void await_bind(environment *env, priority_type priority) {
p.await_bind(env, priority);
if (!p.await_ready())
// make sure that the completion token is setup correctly
// required to handle exceptions from async(...)
p.await_suspend(nullptr);
}

bool await_ready() {
Expand Down

0 comments on commit bcc9651

Please sign in to comment.