Why using stateOffset instead of state to do CAS

后端 未结 0 853
不思量自难忘°
不思量自难忘° 2021-02-01 16:34

In AbstractQueuedSynchronizer class, there are state property and stateOffset property that is defined as final and is used for CAS.

private static final Unsafe u         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题