commit a78ac96134a28d9e8208728bc8affb99122ff4fa (tree)
parent 79bf4003da5fad5046b34d6256eeb8a575890ea5
Author: Loris Cro <kappaloris@gmail.com>
Date: Thu, 7 May 2020 01:49:38 +0200
fix crash in single-threaded builds
Diffstat:
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig
@@ -616,14 +616,16 @@ pub const Loop = struct {
self.workerRun();
- switch (builtin.os.tag) {
- .linux,
- .macosx,
- .freebsd,
- .netbsd,
- .dragonfly,
- => self.fs_thread.wait(),
- else => {},
+ if (!builtin.single_threaded) {
+ switch (builtin.os.tag) {
+ .linux,
+ .macosx,
+ .freebsd,
+ .netbsd,
+ .dragonfly,
+ => self.fs_thread.wait(),
+ else => {},
+ }
}
for (self.extra_threads) |extra_thread| {