Skip to content

Commit 7af988e

Browse files
committed
try IOCP
1 parent e0a8c34 commit 7af988e

File tree

1 file changed

+9
-0
lines changed
  • core/src/net/operator/windows

1 file changed

+9
-0
lines changed

core/src/net/operator/windows/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ impl<'o> Operator<'o> {
103103
));
104104
}
105105
debug_assert_eq!(ret, self.iocp);
106+
if unsafe {
107+
windows_sys::Win32::Storage::FileSystem::SetFileCompletionNotificationModes(
108+
handle,
109+
windows_sys::Win32::System::WindowsProgramming::FILE_SKIP_SET_EVENT_ON_HANDLE as u8,
110+
)
111+
} == 0
112+
{
113+
return Err(Error::last_os_error());
114+
}
106115
Ok(())
107116
}
108117

0 commit comments

Comments
 (0)