You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...so it checks the receivers stop token and calls set_stopped if this is set. The problem with this is that I as the user cannot really disable this behavior. If I wrap the when_all in unstoppable the whole thing cannot be stopped any longer. But I might want the child operations to react to cancellation requests from the outside.
Opting into this behavior is much easier, by wrapping the when_all sender into a sender that does this checking.
auto result_sender = when_all(just_error(std::current_exception()), state.scope.join());
...the problem with this is that when the environment sent a cancellation request earlier, neither of the two senders will be called, not even the async scope's join sender, making this incorrect, I believe.
The text was updated successfully, but these errors were encountered:
when_all
'sstart
function executes this code:...so it checks the receivers stop token and calls
set_stopped
if this is set. The problem with this is that I as the user cannot really disable this behavior. If I wrap thewhen_all
inunstoppable
the whole thing cannot be stopped any longer. But I might want the child operations to react to cancellation requests from the outside.Opting into this behavior is much easier, by wrapping the
when_all
sender into a sender that does this checking.This makes it sometimes impossible to use
when_all
as a building block for other things. For example, the current wording oflet_async_scope
(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3296r1.html) useswhen_all
to ensure the async scope is joined, like this:auto result_sender = when_all(just_error(std::current_exception()), state.scope.join());
...the problem with this is that when the environment sent a cancellation request earlier, neither of the two senders will be called, not even the async scope's join sender, making this incorrect, I believe.
The text was updated successfully, but these errors were encountered: