{{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:

Kafka Consumer Parallelism

Kafka Parallel Consumer Options: Key-level parallelism:  Multiple threads process the messages from a single partition in parallel while ma...