Skip to content

gh-91887: Store strong references to pending tasks#121264

Open
alexhartl wants to merge 5 commits intopython:mainfrom
alexhartl:strong-refs-for-bg-tasks
Open

gh-91887: Store strong references to pending tasks#121264
alexhartl wants to merge 5 commits intopython:mainfrom
alexhartl:strong-refs-for-bg-tasks

Conversation

@alexhartl
Copy link

@alexhartl alexhartl commented Jul 2, 2024

This adds a _pending_tasks set to BaseEventLoop. On Task creation, a (strong) reference to the task is added to this set in _register_task. When a task completes, the respective reference is removed from _pending_tasks in _unregister_task. See the discussion at #91887.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

7 participants