Java-CyclicBarrier

CyclicBarrier A situation not uncommon in concurrent programming occurs when a set of two or more threads must wait at a predetermined execution point until all threads in the set have reached that point. To handle such a situation, the concurrent API supplies the CyclicBarrier class. It enables you to define asynchronization object that suspends … Read more…

Semaphore

Java-Semaphore

Semaphore The java.util.concurrent package adds several higher-level synchronization utilities borrowed from other languages. Semaphore is one of the higher-level synchronization constructs. Semaphores are a very old synchronization construct that has been used in many other languages. Conceptually, a semaphore is a pool of permits—intangible permission slips to perform some activity. The semaphore is initialized with a … Read more…