Java线程状态流转图
2019-09-30 17:02:01 37 举报
Java线程状态流转图
作者其他创作
大纲/内容
Cpu分配时间片
等待时间notifyAll()
WAITING
RUNNABLE
Object.wait()Thread.join()LockSupport.park()
获取锁
TIMED_WAITING
notify()notifyAll()
Blocked
TERMINATED
Cpu让出时间片
start
Thread.sleep(timeout)Object.wait(timeout)Thread.join(timeout)LockSupport.parkNanosLockSupport.parkUntil
Running
NEW
waiting for a monitor lock1、enter a synchronized block/method 2、reenter a synchronized block/method after calling Object.wait
1、线程正常结束2、抛出异常
收藏
0 条评论
下一页