[concurrency-interest] spurious wakeups semantics

David J. Biesack David.Biesack at sas.com
Mon Oct 31 08:19:36 EST 2005


> Date: Sat, 29 Oct 2005 10:56:12 -0700
> From: Joshua Bloch <josh at bloch.us>
> Cc: concurrency-interest at altair.cs.oswego.edu
> 
> David,
> 
> Any wakeup, spurious or otherwise, is followed by acquisition of the
> intrinsic lock on the object being waited on.  There is no race
> condition, and no need for a volatile variable.
> 
>         Regards,
> 
>         Josh

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?

-- 
David J. Biesack     SAS Institute Inc.
(919) 531-7771       SAS Campus Drive
http://www.sas.com   Cary, NC 27513



More information about the Concurrency-interest mailing list