authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-16 13:59:40-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-04-16 13:59:40-07:00
log078185a54baf6093d3f43cd5b51c32322b34af75
treec1a7686d2f90f6c6fd1562528fd434989d7c6d7d
parentd821446cf92b9b8974ec4a3e5d7be883d1741b4e

std.Io: still run Condition test on single-threaded

this will still work under Evented for example

1 files changed, 5 insertions(+), 4 deletions(-)

lib/std/Io/test.zig+5-4
......@@ -973,10 +973,9 @@ test "Select.cancel with no tasks, no deadlock" {
973973}
974974
975975test "Condition" {
976 if (builtin.single_threaded) return error.SkipZigTest;
977976 const io = testing.io;
978977
979 const TestContext = struct {
978 const Context = struct {
980979 ready: Io.Event = .unset,
981980 mutex: Io.Mutex = .init,
982981 cond: Io.Condition = .init,
......@@ -1001,9 +1000,11 @@ test "Condition" {
10011000 }
10021001 };
10031002
1004 var ctx: TestContext = .{};
1003 var ctx: Context = .{};
10051004
1006 var future = try io.concurrent(TestContext.worker, .{&ctx});
1005 var future = io.concurrent(Context.worker, .{&ctx}) catch |err| switch (err) {
1006 error.ConcurrencyUnavailable => return error.SkipZigTest,
1007 };
10071008 defer future.cancel(io) catch {};
10081009
10091010 try ctx.ready.wait(io);