Java AbstractQueuedSynchronizer

Java AbstractQueuedSynchronizer (AQS) is a framework for building locks and synchronizers in Java. It provides a foundation for building complex synchronization constructs, such as Java ReentrantLock and Java Semaphore, by managing a queue of threads waiting for access to a resource. Introduced in Java 2004 with Java 5, AbstractQueuedSynchronizer allows developers to create custom synchronizers with efficient locking mechanisms, optimizing performance in multi-threaded environments.

https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/AbstractQueuedSynchronizer.html