POSIX's `pthread_barrier_wait` and MPI's `MPI_Barrier` implement exactly this pattern to synchronize compute phases in HPC codes like Jacobi iteration and parallel matrix multiplication, where correctness depends on every rank finishing phase N before any starts phase N+1. The generation-counter trick you implement here is what makes the barrier cyclic and safe to reuse across phases without a lost-wakeup race, the same issue naive reusable barriers in early parallel libraries got wrong.