0
Can any one explain more about how to use set priority() method
2 ответов
+ 1
Thread.MIN_PRIORITY minimum (1)
Thread.MAX_PRIORITY maximum (10)
setPriority(int level)
eg: setPriority (5) setts medium priority
+ 1
For example, if there are two threads in competition to execute one wants to print a value and the other wants to update it, priority is a mecanism to solve this conflict.