1. It is an abstract parent class, the full name is AbstractQueuedSynchronizer, which is the framework of blocking locks and related synchronizer tools
2. The usage is that the synchronizer class inherits the parent class to implement the methods of the parent class, and calls the methods of the synchronizer class to achieve the purpose of locking and unlocking, etc.
2. Features
1. Use the state attribute to represent the state of the resource (divided into exclusive mode and shared mode). Subclasses need to define how to maintain this state and control how to acquire and release locks
2. getState is used to get the state state
3.setState is used to set the state state
4. compareAndSetState uses the cas optimistic lock mechanism to set the state state
5. Exclusive mode is that only one thread can access resources, while shared mode allows multiple threads to access resources
6. Provides a waiting queue based on FIFO (first in, first out), similar to Monitor's EntryList
7. Use condition variables to implement the waiting and wake-up mechanism, support multiple condition variables, similar to Monitor's WaitSet
8. The main methods implemented by subclasses are tryAcquire, tryRelease, tryAcquireShared, tryReleaseShared, isHeldExclusively, and UnsupportedOperationException will be thrown by default