Quick Answer
CountDownLatch: one-time gate - await() blocks until count reaches zero. Used to wait for N tasks to complete. CyclicBarrier: reusable rendezvous - await() blocks until N threads all arrive, then all proceed together. Used for parallel computation phases. Semaphore: limits N concurrent accesses to a resource. acquire() blocks if permits exhausted, release() returns a permit. All are in java.util.concurrent.
Answer
CountDownLatch waits for a set of threads to finish. CyclicBarrier allows threads to wait for each other repeatedly. Semaphore controls access to limited resources using permits.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.