Explain CountDownLatch, CyclicBarrier, and Semaphore.

Senior Java

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.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice