Skip to content

[3.7] bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)#13167

Merged
miss-islington merged 1 commit intopython:3.7from
miss-islington:backport-b35acc5-3.7
May 7, 2019
Merged

[3.7] bpo-35125: remove inner callback on outer cancellation in asyncio shield (GH-10340)#13167
miss-islington merged 1 commit intopython:3.7from
miss-islington:backport-b35acc5-3.7

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented May 7, 2019

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

https://bugs.python.org/issue35125

…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>
@miss-islington
Copy link
Copy Markdown
Contributor Author

@MainRo: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 299f69c into python:3.7 May 7, 2019
@miss-islington miss-islington deleted the backport-b35acc5-3.7 branch May 7, 2019 19:38
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.

5 participants