Skip to content

gh-93297: Make asyncio task groups prevent child tasks from being GCed #93299

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 1 commit into from
May 27, 2022

Conversation

1st1
Copy link
Member

@1st1 1st1 commented May 27, 2022

No description provided.

@1st1 1st1 added the needs backport to 3.11 only security fixes label May 27, 2022
@1st1 1st1 requested review from ambv and gvanrossum May 27, 2022 20:20
@1st1 1st1 requested a review from asvetlov as a code owner May 27, 2022 20:20
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but it looks like self._unfinished_tasks is now redundant -- it is always equal to len(self._tasks), isn't it?

@1st1
Copy link
Member Author

1st1 commented May 27, 2022

Okay, but it looks like self._unfinished_tasks is now redundant -- it is always equal to len(self._tasks), isn't it?

Yeah, true. The code looks cleaner now, please see the updated diff.

Copy link
Contributor

@fantix fantix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@1st1 1st1 merged commit e6a5767 into python:main May 27, 2022
@miss-islington
Copy link
Contributor

Thanks @1st1 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2022
…ng GCed (pythonGH-93299)

(cherry picked from commit e6a5767)

Co-authored-by: Yury Selivanov <yury@edgedb.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 27, 2022
@bedevere-bot
Copy link

GH-93305 is a backport of this pull request to the 3.11 branch.

@1st1 1st1 deleted the fixtg branch May 27, 2022 22:20
1st1 added a commit that referenced this pull request May 27, 2022
GH-93299) (#93305)

(cherry picked from commit e6a5767)

Co-authored-by: Yury Selivanov <yury@edgedb.com>

Co-authored-by: Yury Selivanov <yury@edgedb.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.

5 participants