A countdown latch is a synchronization primitive that allows one or more threads to wait until a certain number of operations are completed on other threads.
A countdown latch is a synchronization primitive that allows one or more threads to wait until a certain number of operations are completed on other threads.
The primitive keeps an internal counter initialized with the number of operations to complete. When a working thread signals the completion of an operation, the internal counter is decremented. When this counter reaches zero, the waiting threads are allowed to continue execution.
Resources