Skip to content

bpo-35125: remove inner callback on outer cancellation in asyncio shield #10340

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 2 commits into from
May 7, 2019

Conversation

MainRo
Copy link
Contributor

@MainRo MainRo commented Nov 5, 2018

When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregisters the callback from the inner future when the outer
future is cancelled.

https://bugs.python.org/issue35125

When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregistrer the callback from the inner future when the outer
future is cancelled.
@MainRo
Copy link
Contributor Author

MainRo commented Nov 27, 2018

Any news on this PR ?

@1st1
Copy link
Member

1st1 commented Feb 14, 2019

@asvetlov please review.

@1st1
Copy link
Member

1st1 commented Feb 14, 2019

@MainRo Please generate a NEWS update with blurb.

@miss-islington miss-islington merged commit b35acc5 into python:master May 7, 2019
@miss-islington
Copy link
Contributor

Thanks @MainRo for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 7, 2019
…eld (pythonGH-10340)

When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregisters the callback from the inner future when the outer
future is cancelled.

https://bugs.python.org/issue35125
(cherry picked from commit b35acc5)

Co-authored-by: Romain Picard <[email protected]>
@bedevere-bot
Copy link

GH-13167 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit that referenced this pull request May 7, 2019
…eld (GH-10340)

When the future returned by shield is cancelled, its completion callback of the
inner future is not removed. This makes the callback list of inner inner future
grow each time a shield is created and cancelled.

This change unregisters the callback from the inner future when the outer
future is cancelled.

https://bugs.python.org/issue35125
(cherry picked from commit b35acc5)

Co-authored-by: Romain Picard <[email protected]>
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.

6 participants