Login
From:
zeux.io
(Uncensored)
subscribe
zeux.io - Condvars and atomics do not mix
https://zeux.io/2024/03/23/condvars-atomic/
links
backlinks
Roast topics
Find topics
Find it!
When using std::condition_variable, there’s an easy to remember rule: all variables accessed in wait predicate must be changed under a mutex. However, this is easy to accidentally violate by throwing atomics in the mix.