-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose waitable handles in Windows #152
Conversation
7fe1969
to
603d4dc
Compare
OpenBSD CI failed spuriously I think |
match self { | ||
Self::Socket(raw) => poller.delete(unsafe { BorrowedSocket::borrow_raw(*raw) }), | ||
Self::Handle(handle) => { | ||
poller.remove_waitable(unsafe { BorrowedHandle::borrow_raw(*handle) }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poller API nitpick (although not really related to this PR): why are the poller methods for sockets and handles named wildly different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I missed that when I was implementing that API in smol-rs/polling#111
looks good overall, although I'll need to find time to test this on windows... |
I'm able to use this to integrate completion I/O with async-io memflow/mfio@088e32c Works on wine:
Do not have a windows native machine at hand, however. |
This commit allows waitable handles to be polled in Windows. This allows I/O constructs like processes, mutexes and waitable events be registered into the poller and be polled just like anything else. cc #25 Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
603d4dc
to
3f974ca
Compare
This commit allows waitable handles to be polled in Windows. This allows I/O constructs like processes, mutexes and waitable events be registered into the poller and be polled just like anything else.
cc #25