Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2153336 | OpenJDK6 | Chris Hegarty | P3 | Resolved | Fixed | b01 |
The current spec for Thread.yield
"Causes the currently executing thread object to temporarily pause and allow other threads to execute."
is inadequate because
- there is no guarantee that the thread will or will not pause.
- if there are idle processors it is unlikely to pause.
- it should be clearer that this is a hint to the implementation, almost a "no-op".
- it should be made clear that ordinary application developers should not use this
method. It is only appropriate in unusual circumstances. That is, it should be
denigrated.
"Causes the currently executing thread object to temporarily pause and allow other threads to execute."
is inadequate because
- there is no guarantee that the thread will or will not pause.
- if there are idle processors it is unlikely to pause.
- it should be clearer that this is a hint to the implementation, almost a "no-op".
- it should be made clear that ordinary application developers should not use this
method. It is only appropriate in unusual circumstances. That is, it should be
denigrated.
- backported by
-
JDK-2153336 (spec thread) Fix Thread.yield() javadoc
- Resolved
- relates to
-
JDK-4189292 (thread spec) ThreadGroup and Thread need better and tighter specs
- Closed
-
JDK-6251168 Addition documentation for Thread.yield() and Thread.sleep(0)
- Open
-
JDK-6598810 (thread spec) Thread.yield() not clear with respect to monitor ownership
- Closed
-
JDK-6584700 JLSv3 section 17.9 "Sleep and Yield" needs statement about observable effects removed
- Closed