Thread
2021-04-06 23:50:36 0 举报
线程状态
作者其他创作
大纲/内容
Thread
start()
WAITING
运行状态
系统调度yield
JAVA
CPU
new ThreadNEW
OS
终止
notifynotifyallLockSupport.unpark
C++
notifynotifyALLunpark
调度算法
线程运行结束
TIMED_WAITING
就绪
1.create_thread2.start_thread
sleep(long)wait(long)join(long)LockSupport.parkUntil(xxx)
sleep()wait()join()LockSupport.park
thread.run
OS调度
锁阻塞的情况下Synchronized
run
BLOCKED
JVM
线程执行结束之后,会被销毁
new Thread(()->{}).start()
Thread.start()
运行
0 条评论
下一页