Minggu, 25 September 2016

What are different thread priorities in java

In this article we will learn how to work with thread priorities when there are several threads competing for CPU time. Example code is also provided.   In a uni-processor system, when several threads are competing for the CPU, you might want a certain thread to get more CPU time (burst time) over the remaining threads. We can use thread priorities in such situation.   The thread class provides three final static variables (constants) namely: MIN_PRIORITY, NORM_PRIORITY, and MAX_PRIORITY whose values are 1, 5 and 10 respectively. Priority values can be in the range 1 to 10. 1 denotes minimum priority and

The post What are different thread priorities in java appeared first on Coding Security.


What are different thread priorities in java
read more

Tidak ada komentar:

Posting Komentar