Java Reference
In-Depth Information
Listing 14.12. Counting Semaphore Implemented Using
Lock
.
AQS handles many of the details of implementing a synchronizer, such as FIFO queuing
of waiting threads. Individual synchronizers can define flexible criteria for whether a thread
should be allowed to pass or be required to wait.