-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
bpo-30064: Refactor sock_* asyncio API #10419
Conversation
@1st1 please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice step forward but we also need to start using socket._io_refs
to prevent sockets from being removed during IO.
I'll do it in the following PR. |
@asvetlov: Please replace |
CPython fixed the same issue in python/cpython#10419. Seems like under pressure, more write callbacks may happen before _remove_writer() is called, so we should check for done(). Fixes MagicStack#378
CPython fixed the same issue in python/cpython#10419. Seems like under pressure, more write callbacks may happen before _remove_writer() is called, so we should check for done(). Fixes MagicStack#378
Use
add_done_callback()
to unsubscribe reader/writer early on calcellation.https://bugs.python.org/issue30064