mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
Only check for evented mode in windows.OpenFile when in async mode
This commit is contained in:
parent
aa6654a4b3
commit
85cc3f24a0
@ -110,7 +110,7 @@ pub fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HAN
|
||||
);
|
||||
switch (rc) {
|
||||
.SUCCESS => {
|
||||
if (options.io_mode == .evented) {
|
||||
if (std.io.is_async and options.io_mode == .evented) {
|
||||
_ = CreateIoCompletionPort(result, std.event.Loop.instance.?.os_data.io_port, undefined, undefined) catch undefined;
|
||||
}
|
||||
return result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user