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
{{ message }}
Repository navigation
Commit 36a92fd
Browse filesBrowse the repository at this point in the historyBrowse files
Fix: when_all cancelled from environment (NVIDIA#1718)
* Fix: when_all cancelled from environment
In the case when when_all is being stopped from a stop source in the
environment, the stop_source was triggered multiple times leading to a
use after free bug.
This patch fixes this by performing the following steps:
- Inside the stop callback, increment the reference count.
- Try setting the state to stopped, only if stopped, trigger the
internal stop_source which cancels the children.
- Arrive to decrement the count again and handle any concurrent
completions if needed.
* use atomics from `stdexec::__std::` instead of `std::`
---------
Co-authored-by: Eric Niebler <[email protected]>
0 commit comments