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

Consistently catch exceptions thrown from set_value() calls #87

Open
lewissbaker opened this issue Mar 12, 2020 · 1 comment
Open

Consistently catch exceptions thrown from set_value() calls #87

lewissbaker opened this issue Mar 12, 2020 · 1 comment

Comments

@lewissbaker
Copy link
Contributor

lewissbaker commented Mar 12, 2020

The requirement for set_value() implementations was relaxed to allow them to throw exceptions.
However, this now means we need to audit all call-sites to unifex::set_value() to ensure that we catch exceptions and reflect the error back to unifex::set_error().

Some of this could be helped by a unifex::nothrow_set_value() helper that wraps up this pattern for us conditionally based on whether calling set_value() is noexcept or not.

Places where this needs to be done:

  • inline_scheduler
  • manual_event_loop::schedule() operation
  • ready_done_sender
  • stop_immediately concrete_receiver

We also need to update pretty much all of these senders to have error_types that indicates that they might send an exception_ptr since they don't yet know whether they will be connected to a receiver that has a potentially-throwing set_value() method.

@ispeters
Copy link
Contributor

I'm doing this for inline_scheduler in the latest iteration of PR #225.

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

No branches or pull requests

2 participants