At 10:27 AM 18/11/2003, David Holmes wrote:
>Sylvia Else wrote:
> > Indeed, it's the need to avoid lost notifications that seems to be
> > the source of the spurious notifications that the proposed model
>will allow.
>
>That is not correct. Spurious wakeups should always have been allowed.
>There was no deliberate intent in the API docs to preclude spurious
>wakeups, the lack of mention of them was simply an omission. I wish we
>had fixed this back in 1996/1997 but we didn't. :(
Hmm.
Let's go back to 1996/1997 for a moment. We're writing the API spec, and
we've got the point about wait().
Should it say that some of the notifications can be spurious? If so, how
should we justify that? On the face of it it's a rather bizarre statement.
We might justify it on the grounds that we believe that leaving it out will
make it impossible to implement the API, or impossible to do in a
reasonably efficient and otherwise acceptable way. That belief may have had
a basis in the existence of a most similar problem in Posix threads.
However, the problem is not the same, and the belief would not have been
well founded, since it appears that the Java version of the problem is
indeed amenable to an acceptable solution.
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:53 EDT