Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Most developers will probably never use AQS directly; the standard set of synchronizers covers a fairly wide range of situations. But seeing how the standard synchronizers are implemented can help clarify how they work.
The basic operations that an AQS-based synchronizer performs are some variants of acquire and release. Acquisition is the state-dependent operation and can always block. With a lock or semaphore, the meaning of acquire is straightforward—acquire the lock or a permit—and the caller may have to wait until the synchronizer is in a state where that can happen. With CountDownLatch, acquire means “wait until the latch has reached its terminal state”, and with FutureTask, it means “wait until the task has completed”. Release is not a blocking operation; a release may allow threads blocked in acquire to proceed.