diff --git a/src/backend/kqueue.zig b/src/backend/kqueue.zig index c419e611..4c99601d 100644 --- a/src/backend/kqueue.zig +++ b/src/backend/kqueue.zig @@ -954,7 +954,7 @@ pub const Loop = struct { // Add to our completion queue c.task_loop.thread_pool_completions.push(c); - if (comptime builtin.target.os.tag == .macos) { + if (comptime builtin.target.os.tag.isDarwin()) { // Wake up our main loop c.task_loop.wakeup() catch {}; } @@ -1070,7 +1070,10 @@ pub const Completion = struct { .udata = @intFromPtr(self), }), - .machport => if (comptime builtin.os.tag != .macos) return null else kevent: { + // Every Darwin target, not just macOS: Async is a mach port on + // all of them (watcher/async.zig picks by isDarwin), and iOS + // silently never registered its wakeups here. + .machport => if (comptime !builtin.os.tag.isDarwin()) return null else kevent: { // We can't use |*v| above because it crahses the Zig // compiler (as of 0.11.0-dev.1413). We can retry another time. const v = &self.op.machport;