8000 gh-106751: selectors: optimize EpollSelector.select() by bdraco · Pull Request #106754 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106751: selectors: optimize EpollSelector.select() #106754

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

Merged
merged 7 commits into from
Jul 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
bdraco authored Jul 14, 2023
commit 298b04c38f0493d3fa41cef5107f7dcec554512d
6 changes: 3 additions & 3 deletions Lib/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class PollSelector(_PollLikeSelector):
if hasattr(select, 'epoll'):

_NOT_EPOLLIN = ~select.EPOLLIN
NOT_EPOLLOUT = ~select.EPOLLOUT
_NOT_EPOLLOUT = ~select.EPOLLOUT

class EpollSelector(_PollLikeSelector):
"""Epoll-based selector."""
Expand Down Expand Up @@ -471,8 +471,8 @@ def select(self, timeout=None):
(
key,
(
(event & NOT_EPOLLIN and EVENT_WRITE)
| (event & NOT_EPOLLOUT and EVENT_READ)
(event & _NOT_EPOLLIN and EVENT_WRITE)
| (event & _NOT_EPOLLOUT and EVENT_READ)
)
& key.events
)
Expand Down
0