我知道主线程终止时 JVM 如何处理守护线程和非守护线程。我想知道守护线程和非守护线程的优先级是否有区别?
最佳答案
不,Java中守护线程和非守护线程的优先级没有区别,你可以定义优先级,否则它将从父级继承
来自 JavaDoc:
The priority of the newly created thread is set equal to the priority of the thread creating it, that is, the currently running thread
关于java - Java 中守护线程和非守护线程的优先级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33232813/