Closed jurgen-kluft closed 6 years ago
If compare_exchange_weak
fails, it automatically loads the latest value of m_status
into oldStatus
, which is passed by reference.
See here: "Otherwise, loads the actual value stored in *this
into expected
(performs load operation)."
Thanks Jeff, learned something today :-)
On 14 November 2017 at 21:06, Jeff Preshing notifications@github.com wrote:
Closed #10 https://github.com/preshing/cpp11-on-multicore/issues/10.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/preshing/cpp11-on-multicore/issues/10#event-1340811171, or mute the thread https://github.com/notifications/unsubscribe-auth/AHMMjRLjK5FASBmkzwUIpW0yKusKtnhvks5s2ZA8gaJpZM4QdDVn .
Hello, i have a question related to the signal function of AutoResetEvent where the load statement of
m_status
is not executed again after a fail ofcompare_exchange_weak
.