[libcxx-commits] [libcxx] [libc++] std::condition_variable_any overloads accepting std::stop_token don't register for stop callbacks (PR #77099)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 7 23:35:49 PST 2024


sn-rbroker wrote:

> Ah I think the callback is taking the internal lock.

Yes, I apologise for not including that detail in my comment, as you found it's because `condition_variable_any::notify_all()` acquires a lock on `__mut_`, so the callback is synchronised. with the call to `stop_requested()`.



https://github.com/llvm/llvm-project/pull/77099


More information about the libcxx-commits mailing list