Skip to content
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

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

Merged
merged 1 commit into from May 27, 2022

Conversation

1st1
Copy link
Member

@1st1 1st1 commented May 27, 2022

No description provided.

Copy link
Member

@gvanrossum gvanrossum left a comment

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 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.

fantix
fantix approved these changes May 27, 2022
Copy link
Contributor

@fantix fantix left a comment

LGTM!

Lib/asyncio/taskgroups.py Outdated Show resolved Hide resolved
Copy link
Member

@gvanrossum gvanrossum left a comment

Looks good!

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

@miss-islington miss-islington commented May 27, 2022

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 issue May 27, 2022
…ng GCed (pythonGH-93299)

(cherry picked from commit e6a5767)

Co-authored-by: Yury Selivanov <yury@edgedb.com>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 27, 2022

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

@1st1 1st1 deleted the fixtg branch May 27, 2022
1st1 added a commit that referenced this issue 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.

None yet

5 participants