Thread objects have Priority from 1 through 10, with 10 being the most urgent.
The JVM Thread scheduler tries to run the highest priority available Thread.
The constants Thread.MIN_PRIORITY, Thread.MAX_PRIORITY, and Thread.NORM_PRIORITY have the values 1, 10, and 5, respectively.
If not explicitly set, a thread's priority will have the same priority as the priority of the thread that created it.
If you want to have a particular priority, you should call setPriority before starting the Thread.
|