forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythonGH-106176, pythonGH-104702: Fix reference leak when importing a…
…cross multiple threads (pythonGH-108497) (cherry picked from commit 5f85b44) Co-authored-by: Brett Cannon <brett@python.org>
- Loading branch information
1 parent
7c7b2bf
commit d2f0afd
Showing
2 changed files
with
107 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Core and Builtins/2023-08-25-14-51-06.gh-issue-106176.D1EA2a.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Use a ``WeakValueDictionary`` to track the lists containing the modules each | ||
thread is currently importing. This helps avoid a reference leak from | ||
keeping the list around longer than necessary. Weakrefs are used as GC can't | ||
interrupt the cleanup. |