Re: JavaMemoryModel: Spec on on wait and interrupts

From: Alexander Terekhov (
Date: Tue Jul 29 2003 - 17:23:19 EDT

> I agree; we should go with proposal 2 rather than doing neither.

I think that the spec should just say that "a thread that exits
the m.wait() by throwing IE shall not consume any notification
that may be directed concurrently at m if there are other threads
waiting on m". I may be just missing and/or misunderstanding
something, but the right way to do it on some implementation that
does allow for such thread to consume a notification is to perform
a broadcast -- call notifyAll(). AFAICS notify() isn't sufficient,
so to speak. FYI, POSIX is "allegedly broken" with respect to CV
signaling and "concurrent timouts". It seem that POSIX does allow
for timedout thread to consume a signal... and that "alleged fact"
somewhat surprises some folks.


JavaMemoryModel mailing list -

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