-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b28
-
Not verified
A JSR-166 expert group member wrote:
I see that the documentation for Object.wait() is a bit unclear on this. It
treats all the normal causes for wait returning and states:
"The thread T is then removed from the wait set for this object and
re-enabled for thread scheduling. It then competes in the usual manner with
other threads for the right to synchronize on the object"
but the mention of spurious wakeup follows that and doesn't make it clear
exactly what happens. Spurious wakeup should just be another bullet in the
list along with notify, notifyall, interruption and timeout.
Then a Java expert at a well known software company wrote:
(I think the Javadoc should be corrected so that it is clearer.)
I see that the documentation for Object.wait() is a bit unclear on this. It
treats all the normal causes for wait returning and states:
"The thread T is then removed from the wait set for this object and
re-enabled for thread scheduling. It then competes in the usual manner with
other threads for the right to synchronize on the object"
but the mention of spurious wakeup follows that and doesn't make it clear
exactly what happens. Spurious wakeup should just be another bullet in the
list along with notify, notifyall, interruption and timeout.
Then a Java expert at a well known software company wrote:
(I think the Javadoc should be corrected so that it is clearer.)
- duplicates
-
JDK-6383346 incorrect behavior with continuous interrupt()s to waiting thread
-
- Closed
-