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.
Compiler Explorer link: https://compiler-explorer.com/z/j3qvW488b