dcsimg

How does Linux handle Java thread priorities?

Nathan Meyers

The Linux JDK ignores Java thread priorities. While Linux does offer programs a certain amount of control over task priority, that control can only be fully exercised by the super-user. So the JDK does not try to use any Linux-supplied task priority mechanisms.

Like many aspects of threading, Java thread priorities are a suggestion, not a requirement. If they were a requirement, Java would not be usable in many environments that do not match its threading model. If your application depends on thread priorities for proper behavior, it isn't portable.