Skip to content

[3.10] bpo-37788: Fix reference leak when Thread is never joined (GH-26103) - #26138

Merged
miss-islington merged 1 commit into
python:3.10from
miss-islington:backport-c10c2ec-3.10
May 15, 2021
Merged

[3.10] bpo-37788: Fix reference leak when Thread is never joined (GH-26103)#26138
miss-islington merged 1 commit into
python:3.10from
miss-islington:backport-c10c2ec-3.10

Conversation

@miss-islington

@miss-islington miss-islington commented May 14, 2021

Copy link
Copy Markdown
Contributor

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 [email protected]

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 <[email protected]>
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

2 similar comments
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@miss-islington
miss-islington deleted the backport-c10c2ec-3.10 branch May 15, 2021 09:24
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.

4 participants