diff options
| author | Loris Cro <kappaloris@gmail.com> | 2020-05-07 01:49:38 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-05-07 13:41:02 -0400 |
| commit | a78ac96134a28d9e8208728bc8affb99122ff4fa (patch) | |
| tree | f178b6bf724761c9c097a4b7628e36c8d1b6c95b /lib/std/event/loop.zig | |
| parent | 79bf4003da5fad5046b34d6256eeb8a575890ea5 (diff) | |
| download | zig-a78ac96134a28d9e8208728bc8affb99122ff4fa.tar.gz zig-a78ac96134a28d9e8208728bc8affb99122ff4fa.zip | |
fix crash in single-threaded builds
Diffstat (limited to 'lib/std/event/loop.zig')
| -rw-r--r-- | lib/std/event/loop.zig | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index 8ef5f1d8e4..cbaa156d0e 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| { |
