Some Coding Challenges: Implementing a Countdown Latch.
2 min readMar 29, 2024
The task is to implement a so called CountdownLatch in Java. It will be initialized with an integer count
and provides two methods void await()
and void countDown()
. Threads that call countDown
trigger the count
to decrease be 1
each time. Threads calling the await
are blocked until the count
has reached the value 0
.