mirror of https://github.com/stjepang/smol
Ignore wakeup errors on windows
This commit is contained in:
parent
0c49c5e285
commit
7887904222
|
@ -827,15 +827,13 @@ mod sys {
|
||||||
}
|
}
|
||||||
pub fn notify(&self) -> io::Result<()> {
|
pub fn notify(&self) -> io::Result<()> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let res = winapi::um::ioapiset::PostQueuedCompletionStatus(
|
// This errors if a notification has already been posted, but that's okay.
|
||||||
|
winapi::um::ioapiset::PostQueuedCompletionStatus(
|
||||||
self.handle as winapi::um::winnt::HANDLE,
|
self.handle as winapi::um::winnt::HANDLE,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0 as *mut _,
|
0 as *mut _,
|
||||||
);
|
);
|
||||||
if res != 0 {
|
|
||||||
return Err(io::Error::last_os_error());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue