Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasklet update #4

Merged
merged 10 commits into from
Feb 26, 2019
Merged

Tasklet update #4

merged 10 commits into from
Feb 26, 2019

Conversation

dwd
Copy link
Owner

@dwd dwd commented Feb 21, 2019

  • Adds a tasklet
  • Reworks completion signal

The latter is important for exception handling sanity - it means the caller always gets the result value via the promise_type::get() - ultimately at least - and this means that we can rethrow exceptions here.

Also, the completion signal is emitted during the final_suspend which seems more correct (and this may happen during either an exception or at normal completion).

dwd added 10 commits February 21, 2019 11:28
Starts tasklets when they're co_awaited upon or get()
is called.
Needed to make promise_type_base destructor virtual
Otherwise you get a destroy-when-locked on Windows, which
sensibly terminates.
And also ensure that get() throws if the coroutine isn't yet complete.
And rename the basic exception rethrowing.
@dwd dwd merged commit 7a55cdc into master Feb 26, 2019
@dwd dwd deleted the tasklet-update branch July 24, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant