JVM implementations that do not map Java thread priorities to system thread priorities must not implement Thread.yield as NOP. It does not allow to properly implement background activity (for performance reasons).
I saw behaviour that looks like NOP implementation on Linux and Solaris implementations. (On windows it's probably NOP too but it does not matter as it maps thread priorities).
============
LOWERed priority, this bug is workaround for 4813310.
###@###.### 2003-03-24
Not-a-bug. See the comments in http://java.sun.com/j2se/1.5.0/docs/guide/vm/thread-priorities.html.
The Thread.setPriority and Thread.yield methods are advisory. They constitute hints from the application to the JVM. Properly written, robust, platform-independent code can use setPriority() and yield() to optimize the performance of the application, but should not depend on these attributes for correctness. Likewise, no assumptions should be made about the order in which threads are granted ownership of a monitor or the order in which threads wake in response to the notify or notifyAll method. An excellent reference for these topics is Chapter 9, "Threads," in Joshua Bloch's book Effective Java Programming Language Guide.
I saw behaviour that looks like NOP implementation on Linux and Solaris implementations. (On windows it's probably NOP too but it does not matter as it maps thread priorities).
============
LOWERed priority, this bug is workaround for 4813310.
###@###.### 2003-03-24
Not-a-bug. See the comments in http://java.sun.com/j2se/1.5.0/docs/guide/vm/thread-priorities.html.
The Thread.setPriority and Thread.yield methods are advisory. They constitute hints from the application to the JVM. Properly written, robust, platform-independent code can use setPriority() and yield() to optimize the performance of the application, but should not depend on these attributes for correctness. Likewise, no assumptions should be made about the order in which threads are granted ownership of a monitor or the order in which threads wake in response to the notify or notifyAll method. An excellent reference for these topics is Chapter 9, "Threads," in Joshua Bloch's book Effective Java Programming Language Guide.
- relates to
-
JDK-4985566 Equal priority threads not timslicing properly in Linux
-
- Closed
-