Skip to content

Conversation

@asvetlov
Copy link
Contributor

@asvetlovasvetlov commented Nov 8, 2018

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

https://bugs.python.org/issue30064

@asvetlovasvetlov changed the title [WIP] bpo-30064: Refactor sock_* asyncio APIbpo-30064: Refactor sock_* asyncio APINov 8, 2018
@asvetlov
Copy link
ContributorAuthor

@1st1 please review

Copy link
Member

@1st11st1 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
ContributorAuthor

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

@asvetlovasvetlov merged commit 7438792 into python:masterNov 12, 2018
@bedevere-bot
Copy link

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

@asvetlovasvetlov 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(). FixesMagicStack#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(). FixesMagicStack#378
Sign up for freeto 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

@asvetlov@bedevere-bot@1st1@the-knights-who-say-ni