In this example we will see how and when to use java.util.concurrent.CountDownLatch CountDownLatch is used in synchronisation to allow one or more threads to wait until a set of operations being performed in other threads completes. For Example, it can be used when a Thread has to wait until few dependent threads have started. CountDownLatch is initialised with a given count. This ...
Read More »