-
Notifications
You must be signed in to change notification settings - Fork 187
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
feat: support events is zero for uv_poll #702
base: master
Are you sure you want to change the base?
Conversation
As the poll() manual says that events field may be specified as zero, in which case the only events that can be returned in revents are POLLHUP, POLLERR, and POLLNVAL. This patch allows luv to support this call method with events equal zero. When the parameters in the lua is an empty string, it means that events is zero. Signed-off-by: Tianjia Zhang <[email protected]>
LGTM, please @squeek502 give suggestion |
I'm not sure the changes in this PR would have the intended effect judging by the Libuv implementation of Other minor things:
|
Please rebase, wait CI pass to merge the PR. |
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.
I don't think this should be merged until it's proven that passing 0
for events has the intended effect.
sure |
Following the libuv definitions: For windows, passing events=0 is the canonical behavior of uv_poll_stop. I'm definitely leaning towards this being not desirable behavior, if you want events=0 you should call poll_stop. |
As the poll() manual says that events field may be specified as zero, in which case the only events that can be returned in revents are POLLHUP, POLLERR, and POLLNVAL. This patch allows luv to support this call method with events equal zero. When the parameters in the lua is an empty string, it means that events is zero.