Skip to content

Commit 18486c7

Browse files
Fix tests
Co-authored-by: Lukáš Lalinský <[email protected]>
1 parent ff4beff commit 18486c7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/sync/Futex.zig‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ test "Futex: same bucket different addresses" {
379379
}
380380

381381
fn wakerFunc(io: *Runtime, val: *u32) !void {
382+
// Yield multiple times to ensure waiters have time to block
383+
var i: usize = 0;
384+
while (i < 10) : (i += 1) {
385+
try io.yield();
386+
}
382387
@atomicStore(u32, val, 1, .release);
383388
Futex.wake(io, val, 1);
384389
}

0 commit comments

Comments
 (0)