diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-04 23:47:27 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-04 23:48:55 -0700 |
| commit | 6115cf22404467fd13d0290fc022d51d372d139a (patch) | |
| tree | 26c0bab951c81e89b5f0edcc5dc9f4b8e64df7db /lib/std/event/loop.zig | |
| parent | 78902db68bbd400f6d84b65280c31d417105f2a8 (diff) | |
| download | zig-6115cf22404467fd13d0290fc022d51d372d139a.tar.gz zig-6115cf22404467fd13d0290fc022d51d372d139a.zip | |
migrate from `std.Target.current` to `@import("builtin").target`
closes #9388
closes #9321
Diffstat (limited to 'lib/std/event/loop.zig')
| -rw-r--r-- | lib/std/event/loop.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/event/loop.zig b/lib/std/event/loop.zig index e7fe2da33d..a16f3ea6ac 100644 --- a/lib/std/event/loop.zig +++ b/lib/std/event/loop.zig @@ -1,5 +1,5 @@ const std = @import("../std.zig"); -const builtin = std.builtin; +const builtin = @import("builtin"); const root = @import("root"); const assert = std.debug.assert; const testing = std.testing; @@ -9,7 +9,7 @@ const windows = os.windows; const maxInt = std.math.maxInt; const Thread = std.Thread; -const is_windows = std.Target.current.os.tag == .windows; +const is_windows = builtin.os.tag == .windows; pub const Loop = struct { next_tick_queue: std.atomic.Queue(anyframe), @@ -191,7 +191,7 @@ pub const Loop = struct { self.fs_thread.join(); }; - if (!std.builtin.single_threaded) + if (!builtin.single_threaded) try self.delay_queue.init(); } @@ -825,7 +825,7 @@ pub const Loop = struct { } pub fn sleep(self: *Loop, nanoseconds: u64) void { - if (std.builtin.single_threaded) + if (builtin.single_threaded) @compileError("TODO: integrate timers with epoll/kevent/iocp for single-threaded"); suspend { |
