Daily bit(e) of C++ | std::latch
Daily bit(e) of C++ #398, The downward counter synchronization primitive: std::latch.
std::latch is one of the simple synchronization primitives introduced with C++20.
Latches are initialized to a specific count, can be atomically decreased and used to block until the count reaches zero.