Skip to content
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

Add support for polling HANDLEs #17

Open
sdroege opened this issue Apr 25, 2020 · 4 comments
Open

Add support for polling HANDLEs #17

sdroege opened this issue Apr 25, 2020 · 4 comments

Comments

@sdroege
Copy link

sdroege commented Apr 25, 2020

HANDLEs are used for waitable timers, named pipes, various synchronization primitives, event objects and various other "pollable" things on Windows. Would be nice to be able to poll them in addition to SOCKET.

@piscisaureus
Copy link
Owner

Would be nice, but (at least in older windows versions) there's no reasonable way to do it.

I noticed that windows 10 now has the 'NtAssociateWaitCompletionPacket' syscall; if that does what the name suggests that might be an option to look into.

I currently have very little time to further develop wepoll, so if you want to take a stab at it I'd suggest you fork it and/or send a PR.

@sdroege
Copy link
Author

sdroege commented Aug 3, 2020

With WaitForMultipleObjects() SOCKET and HANDLE work the same way, but I guess you're not using that then :)

@smumriak
Copy link

With WaitForMultipleObjects() SOCKET and HANDLE work the same way, but I guess you're not using that then :)

necroposting, but might be useful for time travelers: alll WaitForObject(s) APIs in win32 (i.e. winapi) have a limitation of maximum 64 handles to be waited on. that does not scale, not even close to what this library aims to support

@notgull
Copy link

notgull commented Jan 17, 2023

I noticed that windows 10 now has the 'NtAssociateWaitCompletionPacket' syscall; if that does what the name suggests that might be an option to look into.

Interesting; how would this work? Do you just call NtAssociateWaitCompletionPacket with the target handle (a file?) and the IOCP and then, once the handle is "ready", it shows up in the IOCP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants