AW: [concurrency-interest] spurious wakeups semantics

Ernst, Matthias matthias.ernst at coremedia.com
Mon Oct 31 08:41:45 EST 2005


> what happens to thread T2 which was running and holding the 
> lock when T1 gets the spurious wakeup?
> At that time, it is holding the lock, so if T1 acquires it, 
> T2 must give it up.. thus T2 must enter a wait state, correct?

No, it's the other way around: T2 continues to hold the lock, so T1 
cannot acquire it _yet_. It has to wait until T2 releases the lock.
It's a spontaneous transition from "waiting on xxx" to
"trying to enter xxx".

Matthias



More information about the Concurrency-interest mailing list