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

when using epoll, I guess any fallthrough-poll should not be closed? #52

Open
wuhanck opened this issue May 1, 2019 · 2 comments
Open

Comments

@wuhanck
Copy link

wuhanck commented May 1, 2019

I read the eventing/epoll.c.
When create fallthrough-poll, it doesn't touch loop->num_polls.
When close fallthrough-poll, it will do loop->num_polls--.
It is a designed behavior and imply fallthrough-poll may not be closed? or I miss sth?

@ghost ghost added the bug label May 3, 2019
@ghost
Copy link

ghost commented May 3, 2019

This seems like a bug in epoll.c

@ghost
Copy link

ghost commented Jul 28, 2019

So the point of a fallthrough poll or async is to.. fall through. That is, they are supposed to be left in the loop until the loop falls through. This means that it doesn't matter that much if we go negative or not, because that integer is never read.

It could be made a bit more elegant and more obvious but yeah, this is not an issue in real usage. For instance, the epoll lopp has 1 fallthrough timer and 1 fallthrough async. They are held by the loop itself, and will only be closed after the loop has fallen through.

So it never becomes a problem. All your polls should be non-fallthrough anyways, only things relating to the loop itself should be fallthrough.

@ghost ghost added the wontfix label Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant