From a78ac96134a28d9e8208728bc8affb99122ff4fa Mon Sep 17 00:00:00 2001 From: Loris Cro Date: Thu, 7 May 2020 01:49:38 +0200 Subject: [PATCH] fix crash in single-threaded builds --- lib/std/event/loop.zig | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 8ef5f1d8e..cbaa156d0 100644 --- 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| {