commit 19f893c6bbb3f5ab4e8d943b0ac2fefa94e5d666 (tree) parent ad301d687a2c75c1bf692a945b536765055c94f7 Author: Andrew Kelley <andrew@ziglang.org> Date: Thu, 14 Jan 2021 22:42:29 -0700 std.Thread: avoid compile errors for single-threaded OS's Diffstat:
| M | lib/std/Thread.zig | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig @@ -554,5 +554,7 @@ pub fn getCurrentThreadId() u64 { } test "" { - std.testing.refAllDecls(@This()); + if (!builtin.single_threaded) { + std.testing.refAllDecls(@This()); + } }