Skip to content

Commit

Permalink
windows: no readiness for sockets
Browse files Browse the repository at this point in the history
This is technically not good as the sockets can block the thread pool.
For now though this makes windows sort of "work".

Windows needs own backend using completition model.
  • Loading branch information
Cloudef committed Jun 26, 2024
1 parent d6b8263 commit ffaff32
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/aio/posix.zig
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,15 @@ pub inline fn openReadiness(op: anytype) OpenReadinessError!Readiness {
}
break :blk .{ .fd = op.file.handle, .mode = .in };
},
.accept, .recv, .recv_msg => .{ .fd = op.socket, .mode = .in },
.accept, .recv, .recv_msg => switch (builtin.target.os.tag) {
.windows => .{},
else => .{ .fd = op.socket, .mode = .in },
},
.socket, .connect, .shutdown => .{},
.send, .send_msg => .{ .fd = op.socket, .mode = .out },
.send, .send_msg => switch (builtin.target.os.tag) {
.windows => .{},
else => .{ .fd = op.socket, .mode = .out },
},
.open_at, .close_file, .close_dir, .close_socket => .{},
.timeout, .link_timeout => .{ .fd = (try Timer.init(.monotonic)).fd, .mode = .in },
.cancel, .rename_at, .unlink_at, .mkdir_at, .symlink_at => .{},
Expand Down

0 comments on commit ffaff32

Please sign in to comment.