| ... | @@ -112,7 +112,8 @@ pub const Loop = struct { | ... | @@ -112,7 +112,8 @@ pub const Loop = struct { |
| 112 | /// have the correct pointer value. | 112 | /// have the correct pointer value. |
| 113 | /// https://github.com/ziglang/zig/issues/2761 and https://github.com/ziglang/zig/issues/2765 | 113 | /// https://github.com/ziglang/zig/issues/2761 and https://github.com/ziglang/zig/issues/2765 |
| 114 | pub fn init(self: *Loop) !void { | 114 | pub fn init(self: *Loop) !void { |
| 115 | if (builtin.single_threaded) { | 115 | if (builtin.single_threaded |
| | 116 | or (@hasDecl(root, "event_loop_mode") and root.event_loop_mode == .single_threaded)) { |
| 116 | return self.initSingleThreaded(); | 117 | return self.initSingleThreaded(); |
| 117 | } else { | 118 | } else { |
| 118 | return self.initMultiThreaded(); | 119 | return self.initMultiThreaded(); |