{{theTime}}

Search This Blog

Total Pageviews

What is CountDownLatch

CountDownLatch is a versatile synchronization tool.


- It Allows one or more threads to wait until a work is done in other threads
- Used as on/off latch or gate
- Threads invoking await() method waits at the gate
- The count cannot be reset
- TO reset the count, you may check with CyclicBarrier
- Useful property is that it doesn't require that threads calling countDown wait for the count to reach zero before proceeding

No comments:

Java Script GET request Sample Code

fetch(' https://api.public.com/api ')   .then(response => response.json())   .then(data => console.log(data))   .catch(error =...