Re: JavaMemoryModel: Draft version of JSR-133 public review document

From: Sylvia Else (sylviae@optushome.com.au)
Date: Thu Jan 29 2004 - 21:34:01 EST


Note: Replied only to JMM.

At 09:00 AM 30/01/2004, Bill Pugh wrote:

>Please give us feedback on anything that you think needs to be addressed,
>but do so quickly. We should finish all of our work on this by next
>Monday, Feb 2nd.

This is a point I've raised before:

In section 13.2 it says "InterruptedException. However, Java programs
cannot rely
on exactly which wait set removal action occurs when a notification and an
interruption
action execute at approximately the same time."

What does "execute at approximately the same time." mean? What observable
event(s) must happen between the notify and interrupt, or vice versa, such
that the these operations are no longer executing at approximately the same
time.

In section 13.4 it says 'Note that if a thread is both interrupted and
woken via notify(), and that thread
returns from wait() by throwing an InterruptedException, then some other
thread in the
wait set must be notified.'

OK, this is only a note, but I think it should be made clear that the
thread that gets notified must have been continually in the wait set since
the original notify occurred. Otherwise it manifests as a combination of a
spurious notification (allowed) and a lost notification (not allowed).

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:57 EDT