1. Thread scheduling
Preemptive scheduling
Non-preemptive scheduling
1.1 Preemptive Scheduling
The higher the priority, the higher the probability of grabbing the CPU
1.2 Daemon threads
Daemon thread, non-daemon thread. When other non-daemon threads finish executing, the daemon threads will end one after another.
Application Scenarios of Daemon Threads