Previous | Home | Next |
Thread priorities used by thread scheduler to set thread priorities. On the priority the thread executes. Thread of higher priority get more CPU cycle. Java implement thread priority Two methods:
- final void setPriority(in level);
- final int getPriority();
Here level is priority level. Priorities are integer values from 1 (lowest priority given by the constant Thread.MIN_PRIORITY) to 10 (highest priority given by the constant Thread.MAX_PRIORITY ). The default priority is 5 (Thread.NORM_PRIORITY).
Previous | Home | Next |