zig/lib/std/Thread
Lucas Santos ef77cc0de1 Fixes doc comment of Futex.wait
On Windows, changing the value at the target address is not sufficient, there needs to be a wake call.
From [MSDN](https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress):
> If the value at Address differs from the value at CompareAddress, the function returns immediately. If the values are the same, the function does not return until another thread in the same process signals that the value at Address has changed by calling WakeByAddressSingle or WakeByAddressAll or the timeout elapses, whichever comes first.
We could note that this behavior is only observed on Windows. However, if we want the function to have consistent behavior across all platforms, we should require users to call wake. On platforms where changing the value is sufficient to wake the waiting thread, an unblocking of the thread without a matching wake would just be considered a spurious wake.
2025-12-27 20:40:19 +01:00
..
Mutex std.Thread.Mutex.Recursive: alternate implementation 2024-06-12 18:07:39 -07:00
Condition.zig std.os.windows: eliminate forwarder function in kernel32 (#25766) 2025-10-31 13:54:50 +00:00
Futex.zig Fixes doc comment of Futex.wait 2025-12-27 20:40:19 +01:00
Mutex.zig std.os.windows: eliminate forwarder function in kernel32 (#25766) 2025-10-31 13:54:50 +00:00
RwLock.zig std: make RwLock test less intensive 2025-10-18 09:28:43 +01:00
Semaphore.zig Change many test blocks to doctests/decltests 2024-02-26 15:18:31 -08:00
WaitGroup.zig std.Io.Threaded: slightly different semantics 2025-11-21 19:54:41 -08:00