[concurrency-interest] spurious wakeups semantics

Dawid Kurzyniec dawidk at mathcs.emory.edu
Wed Nov 2 17:58:12 EST 2005


Doug Lea wrote:

> Hi Peter,
>
> It's nice (honestly!) to get your usual balance on the perennial
> spurious wakeup issue.
>
> A couple of notes on it:
>
> 1. As it turns out, the current implementation 
> locks.ReentrantLock.Condition.await() do not spuriously
> wake up. We don't document or promise this though, for the kinds
> of reasons Tim and Josh mentioned.
>
In the 1.4 backport, spurious wakeups are possible when using unfair 
conditions, and in fact I have seen them happening (on MS Windows). They 
won't occur when using fair conditions, although - as Doug says - this 
is undocumented and not promised to hold in the future.

Regards,
Dawid Kurzyniec



More information about the Concurrency-interest mailing list