锁
2020-06-20 13:27:28 0 举报
Java锁
作者其他创作
大纲/内容
ThreadLocal
Node
waitStatus(1:已取消;-1:信号;-2:条件;-3:传播)
threadnextWaiterSHARED/EXCLUSIVE
<Sync>
-transient Thread xclusiveOwnerThread
NonfairSync
WriteLock
Node
SHAREDEXCLUSIVECANCELLEDSIGNALCONDITIONPROPAGATEwaitStatusprevnextthreadnextWaiterheadtailstatespinForTimeoutThreshold
ReentrantLock
WNode
prevnextcowaitthreadstatusmode
<<Lock>>
<AbstractOwnableSynchronizer>
ReadWriteLockView
ThreadLocalHoldCounter
FairSync
ReadLock
<AbstractQueuedSynchronizer>
WriteLockView
<<Condition>>
ConditionObject
firstWaiterlastWaiterREINTERRUPTTHROW_IE
ReentrantReadWriteLock
ReadLockView
StampedLock
wheadwtailreadLockViewwriteLockViewreadWriteLockViewstatereaderOverflow
<<ReadWriteLock>>
Lock readLock()Lock writeLock()
0 条评论
回复 删除
下一页