mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-35378: Fix multiprocessing.Pool references (GH-11627)
Changes in this commit: 1. Use a _strong_ reference between the Pool and associated iterators 2. Rework PR #8450 to eliminate a cycle in the Pool. There is no test in this commit because any test that automatically tests this behaviour needs to eliminate the pool before joining the pool to check that the pool object is garbaged collected/does not hang. But doing this will potentially leak threads and processes (see https://bugs.python.org/issue35413).
This commit is contained in:
parent
4b250fc1da
commit
3766f18c52
3 changed files with 80 additions and 39 deletions
|
@ -2593,7 +2593,6 @@ class _TestPool(BaseTestCase):
|
|||
pool = None
|
||||
support.gc_collect()
|
||||
|
||||
|
||||
def raising():
|
||||
raise KeyError("key")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue