Java: is JVM thread priority changed (implicitly)
Not. I won't. Just add under the hoods your OS or system that has a final call on which threads will run on it and therefore its own scheduling algorithm ultimately matters.
However, the JVM presents threads to the OS, and here the priority again plays a role based on the JVM scheduling algorithm, but its OS that decides.
source to share
I don't see any explicit guarantees for this, but this is not a thing that comes with explicit guarantees.
There is a getter and a setter for the priority, and the implication is that the value won't change unless someone calls the setter again.
But note that this does not mean that no part of the system can call setPriority()
in your "threads", just that Thread
there is no internal trick inside the class itself .
source to share