Java 中的守护进程和非守护进程线程优先级
Daemon and non-daemon thread priority in Java
我知道当主线程终止时 JVM 如何处理守护线程和非守护线程。请问守护线程和非守护线程的优先级是否有区别?
No Java 中Daemon 和non-daemon 线程的优先级没有区别,你可以定义优先级或者它会从父级继承
来自Java文档:
The priority of the newly created thread is set equal to the priority
of the thread creating it, that is, the currently running thread
我知道当主线程终止时 JVM 如何处理守护线程和非守护线程。请问守护线程和非守护线程的优先级是否有区别?
No Java 中Daemon 和non-daemon 线程的优先级没有区别,你可以定义优先级或者它会从父级继承
来自Java文档:
The priority of the newly created thread is set equal to the priority of the thread creating it, that is, the currently running thread