Re: JavaMemoryModel: Spec on on wait and interrupts

From: Bill Pugh (pugh@cs.umd.edu)
Date: Tue Jul 29 2003 - 17:38:29 EDT


A slight wording problem is that the thread may have already consumed
the notify at the time it receives the interrupt. But I think your
suggested wording is fine.

Here is the test case we have in mind for this:

* thread 1 locks X and then waits on X
* thread 2 locks X and then waits on X
* thread 3 locks X, performs X.notify(), interrupts thread 1, and then releases
        the lock.

At least one of thread 1 or 2 must receive a notify.

We should get the same behavior if thread 3 performs the interrupt first.

Bill
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:48 EDT