mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.Io.Threaded: fix futex timeout race handling
This commit is contained in:
committed by
Alex Rønne Petersen
parent
a3ea3bd31d
commit
35a191ec1c
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user