[3.10] bpo-37788: Fix reference leak when Thread is never joined (GH-26103) by miss-islington · Pull Request #26138 · python/cpython

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

Conversation

@miss-islington

When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown. If many threads are created this way, the _shutdown_locks set could therefore grow endlessly. To avoid such a situation, purge expired locks each time a new one is added or removed.
(cherry picked from commit c10c2ec)

Co-authored-by: Antoine Pitrou antoine@python.org

https://bugs.python.org/issue37788

Automerge-Triggered-By: GH:pitrou

…6103)

When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown.  If many threads are created this way, the _shutdown_locks set could therefore grow endlessly.  To avoid such a situation, purge expired locks each time a new one is added or removed.
(cherry picked from commit c10c2ec)

Co-authored-by: Antoine Pitrou <antoine@python.org>

@miss-islington

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

2 similar comments

@miss-islington

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

@miss-islington

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

@miss-islington

Sorry, I can't merge this PR. Reason: Pull Request is not mergeable.