zig/lib/std/Thread
Igor Anić f229b74099 stdlib: fix condition variable broadcast FutexImpl
fixes #12877

Current implementation (before this fix) observes number of waiters when
broadcast occurs and then makes that number of wakeups.

If we have multiple threads waiting for wakeup which immediately go into
wait if wakeup is not for that thread (as described in the issue). The
same thread can get multiple wakeups while some got none.
That is not consistent with documented behavior for condition variable
broadcast: `Unblocks all threads currently blocked in a call to wait()
or timedWait() with a given Mutex.`.

This fix ensures that the thread waiting on futext is woken up on futex wake.
2022-11-17 20:58:45 +01:00
..
Condition.zig stdlib: fix condition variable broadcast FutexImpl 2022-11-17 20:58:45 +01:00
Futex.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
Mutex.zig stage2+stage1: remove type parameter from bit builtins 2022-08-22 11:19:20 +03:00
ResetEvent.zig std.Thread: ResetEvent improvements (#11523) 2022-04-26 16:48:56 -05:00
RwLock.zig Fix for #13163: DefaultRwLock accumulates write-waiters, eventually fails to write lock (#13180) 2022-10-17 18:15:15 -05:00
Semaphore.zig std: add test for Thread.Semaphore 2022-01-29 20:30:53 +00:00