JavaMemoryModel: JSR133 para 12.2 wording.

From: Sylvia Else (sylviae@optushome.com.au)
Date: Fri Nov 21 2003 - 18:25:18 EST


In paragraph 12.2 of the draft spec, it says "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."

I have previously express my concern about the vagueness of the term
"approximately the same time" in this context.

The situation seems to be that if, for some thread T that waits on M,

Wait of T on M
     happens before interrupt of T which
     happens before notify on M which
     happens before return from wait

or

Wait of T on M
     happens before notify on M which
     happens before interrupt of T which
     happens before return from wait

then the outcome is not predictable.

There is no upper limit on the time that elapses between the interrupt and
the notify, or vice versa, so describing this as "approximately the same
time" is misleading.

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