]> granicus.if.org Git - python/commit
bpo-35378: Fix multiprocessing.Pool references (GH-11627)
authorPablo Galindo <Pablogsal@gmail.com>
Mon, 11 Feb 2019 17:29:00 +0000 (17:29 +0000)
committerGitHub <noreply@github.com>
Mon, 11 Feb 2019 17:29:00 +0000 (17:29 +0000)
commit3766f18c524c57784eea7c0001602017d2122156
tree6c24d8ab4a26589c3ee9e5dea3b3cda4ab94e9a6
parent4b250fc1da9c893803cf724a4974450b5e10bd8a
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).
Lib/multiprocessing/pool.py
Lib/test/_test_multiprocessing.py
Misc/NEWS.d/next/Library/2019-01-21-02-15-20.bpo-35378.4oF03i.rst [new file with mode: 0644]