As the title says, I couldn’t find something like this in the std. I want my threads to wait for the others at the latch and when all threads are ready, i.e. the countdown reaches 0, they get unblocked.
Could I glue something together with a std.atomic.Value and std.Io.Event? You dont have to give me a fully implemented answer unless you want, just point me in the direction.
Also, do you think this should be added to the std?
Thanks in advance!
Edit: I’ve found this CountDownLatch.zig/CountDownLatch.zig at main · fr233/CountDownLatch.zig · GitHub
but it’s quite old. Can we do better in 0.16?