In Java, every Thread has a priority. This priority is specified as a
number between 1 to 10.
Scheduler in Java schedules different threads based on the priority
of a thread. It is also known as pre-emptive scheduling.
The thread with higher priority gets preference in execution over a
thread with lower priority
https://learn.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities