Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/backend/kqueue.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
}
Expand Down Expand Up @@ -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;
Expand Down