mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
Previous implementation didn't check whether there are pending signals after return from futex.wait. While it is ok for broadcast case it can result in multiple wakeups when only one thread is signaled. This implementation checks that there are pending signals before returning from wait. It is similar to the original implementation but the without initial signal check, here we first go to the futex and then check for pending signal.