[concurrency-interest] Re: interrupt / notify races even in 6.0beta?

Doug Lea dl at cs.oswego.edu
Thu May 18 06:42:32 EDT 2006


Dawid Kurzyniec wrote:
> 
> ...
> Perhaps the problem is that the OS 
> layer does not expose things this way?

Yes. This is the main issue. For example, on some platforms,
Java-level interrupts may sometimes entail OS-level signals. There is better
(although as-yet unexploited) OS integration possible using park/unpark,
but even here, the interaction with interrupts is messy.


> In any case, since the ordering is not deterministic, the aforementioned 
> ReentrantLock unit test is probably too strict. Would a Thread.yield() 
> or a delay inserted between interrupt and notify be a reasonable fix?...
> 

Thanks! You are right that a few TCK tests implicitly assumed orderings
that aren't mandated by any specs, and so should force delays. Updated
versions are now in our CVS.

-Doug



More information about the Concurrency-interest mailing list