Use epoll when available to support fds > 1023#448
Conversation
| h._epoll_select(socks, [], []) | ||
| h.stop() | ||
|
|
||
|
|
| h._select(socks, [], []) | ||
| h._epoll_select(socks, [], []) | ||
| h.stop() | ||
|
|
| h.stop() | ||
| self.assertFalse(h._running) | ||
|
|
||
|
|
| @@ -1,3 +1,4 @@ | |||
| import tempfile | |||
| raise | ||
| # if we hit our timeout, lets return as a timeout | ||
| return ([], [], []) | ||
|
|
|
|
||
| _HAS_EPOLL = hasattr(select, "epoll") | ||
|
|
||
| def _to_fileno(obj): |
|
How does this change coverage? I'll be getting automatic coverage checking up next to make it a bit easier to track. Otherwise I think this looks good, the commits need to be squashed and updated per the CONTRIBUTING doc style guide. Thanks! |
bad82a4 to
321d7c5
Compare
|
Alright I think I finally figured out how to get the commits looking the way we want them. |
|
The easiest way I've found is to use |
|
ended up resetting to commit^, then rebase -i and squash, then force push. Finally down to one commit though. Is github's automatic squash-merging not available for automatic merges? |
|
It doesn't seem apply quite right for some reason. For the git commit message, it should look like this: Easiest way to change the text is |
When epoll is available, and the highest fd in use is > 1023, route through epoll. Otherwise, use the existing select() behavior so by and large nothing changes. Closes python-zk#266, python-zk#171
|
No, it's my bad. I failed to properly grok the CONTRIBUTING.md guidelines. I'm totally ok with the "hassle" to keep things tidy :) |
|
Thanks for the PR! |
Here's my take on the fd > 1023 issue. I'm open to suggestions for the unit test.
Major points:
When epoll is available, and the highest fd in use is > 1023, route through epoll.
Otherwise, use the existing select() behavior so by and large nothing changes.
closes #266
closes #171