Thursday, 14 April 2016

Differences between CyclicBarrier and CountDownLatch

Here are main differences between CyclicBarrier and CountDownLatch concurrency utils in Java :

1) CyclicBarrier is resulable, CountDownLatch is not.

2) Both CyclicBarrier and CountDownLatch wait for fixed number of threads.

3) CountDownLatch is advanceable but CyclicBarrier is not.

Post a Comment