Open
Description
The documentation for the signal CAS methods says:
If the value of the signal is changed, all the agents waiting on signal for which value satisfies their wait condition are awakened.
Currently the implementations in InterruptSignal
(e.g. InterruptSignal::CasAcqRel
) call SetEvent()
unconditionally resulting in spurious wakes for any waiting agent in cases where the signal does not have the expected value. It should check to see if the observed value is the same as the expected value and only SetEvent()
if so as otherwise it does not actually change anything and no waiters would be expected to make progress.