线程的优先级:
-
线程的优先级等级:
MAX_PRIORITY :10
MIN _PRIORITY :1
NORM_PRIORITY :5 -
涉及的方法
getPriority() : :返回线程优先值
setPriority(int newPriority) : :改变线程的优先级 -
说明
1.线程创建时继承父线程的优先级
2.低优先级只是获得调度的概率低,并非一定是在高优先级线程之后才被调用
线程的优先级:
线程的优先级等级:
MAX_PRIORITY :10
MIN _PRIORITY :1
NORM_PRIORITY :5
涉及的方法
getPriority() : :返回线程优先值
setPriority(int newPriority) : :改变线程的优先级
说明
1.线程创建时继承父线程的优先级
2.低优先级只是获得调度的概率低,并非一定是在高优先级线程之后才被调用