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

no need for multiple epoll fds #8

Closed
whyrusleeping opened this issue Sep 14, 2015 · 4 comments
Closed

no need for multiple epoll fds #8

whyrusleeping opened this issue Sep 14, 2015 · 4 comments

Comments

@whyrusleeping
Copy link
Contributor

epoll_ctl_add is safe to call in a different thread, even while another thread (goroutine) is in epoll_wait. Knowing this, we can have a single 'poller' instance that communicates with a master loop. I can work on this if you'd like, although you might be more familiar with the code, let me know.

ref: http://man7.org/linux/man-pages/man2/epoll_wait.2.html#NOTES

@jbenet
Copy link
Contributor

jbenet commented Sep 15, 2015

From that man page I'm not sure epoll can add arbitrary numbers of fds to one epoll fd. Maybe test it with 100k?


Sent from Mailbox

On Mon, Sep 14, 2015 at 2:58 PM, Jeromy Johnson notifications@github.com
wrote:

epoll_ctl_add is safe to call in a different thread, even while another thread (goroutine) is in epoll_wait. Knowing this, we can have a single 'poller' instance that communicates with a master loop. I can work on this if you'd like, although you might be more familiar with the code, let me know.

ref: http://man7.org/linux/man-pages/man2/epoll_wait.2.html#NOTES

Reply to this email directly or view it on GitHub:
#8

@ghost ghost mentioned this issue Sep 15, 2015
51 tasks
@whyrusleeping
Copy link
Contributor Author

better refs: http://man7.org/linux/man-pages/man7/epoll.7.html (under /proc interfaces)

and here: https://banu.com/blog/2/how-to-use-epoll-a-complete-example-in-c/ discusses the differences between select and epoll.

@jbenet
Copy link
Contributor

jbenet commented Sep 15, 2015

ok

@Kubuxu
Copy link
Member

Kubuxu commented Jan 25, 2017

Resolved in #17

@Kubuxu Kubuxu closed this as completed Jan 25, 2017
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

3 participants