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

selector _BaseSelectorImpl._key_from_fd reimplements .get() #106554

Closed
bdraco opened this issue Jul 9, 2023 · 0 comments
Closed

selector _BaseSelectorImpl._key_from_fd reimplements .get() #106554

bdraco opened this issue Jul 9, 2023 · 0 comments
Labels
type-feature A feature request or enhancement

Comments

@bdraco
Copy link
Contributor

bdraco commented Jul 9, 2023

selector _BaseSelectorImpl._key_from_fd reimplements .get()

def _key_from_fd(self, fd):

This internal method isn't documented https://docs.python.org/3/library/selectors.html which means it likely can be replaced with .get() which would reduce runtime in the select loops

current:
Screenshot 2023-07-08 at 3 32 38 PM

removed:
Screenshot 2023-07-08 at 3 32 34 PM

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants