commit 35a191ec1ca8b39ce6b9460e00a5efaf56851345 (tree)
parent a3ea3bd31dc0b8c6ff98c9bc95ffcd36bd8aba82
Author: Matthew Lugg <mlugg@mlugg.co.uk>
Date: Wed, 21 Jan 2026 13:52:14 +0100
std.Io.Threaded: fix futex timeout race handling
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig
@@ -15791,7 +15791,7 @@ const parking_futex = struct {
);
switch (old_status.cancelation) {
.parked => {}, // state updated to `.none`
- .none => unreachable, // if another `wake` call is unparking this thread, it should have removed it from the list
+ .none => continue, // race with timeout; they are about to lock `bucket.mutex` and remove themselves from the bucket
.canceling => continue, // race with a canceler who hasn't called `removeCanceledWaiter` yet
.canceled => unreachable,
.blocked => unreachable,