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

bpo-30064: Refactor sock_* asyncio API #10419

Merged
merged 11 commits into from
Nov 12, 2018
Merged

Conversation

asvetlov
Copy link
Contributor

@asvetlov asvetlov commented Nov 8, 2018

Use add_done_callback() to unsubscribe reader/writer early on calcellation.

https://bugs.python.org/issue30064

@asvetlov asvetlov changed the title [WIP] bpo-30064: Refactor sock_* asyncio API bpo-30064: Refactor sock_* asyncio API Nov 8, 2018
@asvetlov
Copy link
Contributor Author

asvetlov commented Nov 8, 2018

@1st1 please review

Copy link
Member

@1st1 1st1 left a 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.

@asvetlov
Copy link
Contributor Author

I'll do it in the following PR.
Wanted to fix one issue at once.

@asvetlov asvetlov merged commit 7438792 into python:master Nov 12, 2018
@bedevere-bot
Copy link

@asvetlov: Please replace # with GH- in the commit message next time. Thanks!

@asvetlov asvetlov deleted the issue-30064 branch November 12, 2018 17:00
fantix added a commit to fantix/uvloop that referenced this pull request Feb 8, 2021
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
fantix added a commit to fantix/uvloop that referenced this pull request Feb 9, 2021
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
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

Successfully merging this pull request may close these issues.

4 participants