Skip to content

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

Merged
miss-islington merged 2 commits intopython:masterfrom
MainRo:bugfix-shield-cancel
May 7, 2019
Merged

bpo-35125: remove inner callback on outer cancellation in asyncio shield#10340
miss-islington merged 2 commits intopython:masterfrom
MainRo:bugfix-shield-cancel

Conversation

@MainRo
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

MainRo commented Nov 27, 2018

Any news on this PR ?

@1st1
Copy link
Copy Markdown
Member

1st1 commented Feb 14, 2019

@asvetlov please review.

@1st1
Copy link
Copy Markdown
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
Copy Markdown
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 <romain.picard@oakbits.com>
@bedevere-bot
Copy link
Copy Markdown

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 <romain.picard@oakbits.com>
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