facebookexperimental / facebookexperimental/libunifex
Consistently catch exceptions thrown from set_value() calls
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.