Showing posts with label getPriority. Show all posts
Showing posts with label getPriority. Show all posts

Saturday, 25 January 2014

THREAD PRIORITIES

SET THREAD PRIORITY IN JAVA

Explain thread priority in java with suitable example

In Java, thread scheduler can use the thread priorities in the form of integer value to each of its thread to determine the execution schedule of threads. Thread gets the ready-to-run state according to their priorities. The thread scheduler provides the CPU time to thread of highest priority during ready-to-run state.  Priorities are integer values from 1 to 1.