Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2153337 | OpenJDK6 | Chris Hegarty | P3 | Resolved | Fixed | b01 |
Users need to understand that using wait, notify, and notifyAll on a Thread instance is a bad idea because Sun's implementation of Thread.join uses a loop of Object.wait on the Thread instance that is conditioned on !isAlive() and the JVM does a notifyAll on this object when the thread terminates. This means, for example, that thread termination can be confused with a notify or notifyAll if careful control of visibility is not maintained or inadequate condition expressions are used, causing an inappropriate escape from a wait loop. It also means users might depend on a "free" notifyAll stemming from thread termination when other compliant implementations will *NOT* provide this.
- backported by
-
JDK-2153337 (spec thread) Implementation detail poses hazard for wait(), notify{All}?() usage with join()
- Resolved