RE: JavaMemoryModel: Waits, Interrupts and Notify-s

From: Sylvia Else (sylviae@optushome.com.au)
Date: Sat May 24 2003 - 21:02:37 EDT


>A counter-example to what?

Ok, let me ask this, if notification propagation is to be used to resolve
the problem posed by notifications being lost when a thread is interrupted,
when will the propagation occur?

1. At the time of the original notification (unlikely - requires prescience).
2. At the time of the interrupt() method call (although the calling thread
may not have the monitor locked).
3. In the interrupted thread, before it locks the monitor again.
4. In the interrupted thread, after it locks the monitor again.
5. At some other time/place.

My concern is that a program could be sensitive to the timing (except for
1). If that is the case, then it follows that the JVM is not behaving in
accordance to the API specification, in which case either the JVM is wrong,
or the specification is.

At the moment, my feeling is that if notification propagation is to be
allowed in this situation, then the interrupt() method has to be documented
accordingly.

Sylvia.

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



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