#LockSupport

Java多线程 LockSupport

在AQS里面进行阻塞线程,解除阻塞线程就用的LockSupport。JDK1.8源码:packagejava.util.concurrent.locks;importsun.misc.Unsafe;publicclassLockSupport{privateLockSupport(){}//Cannotbeinstan...
代码星球 ·2020-08-09