diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-02-11 17:29:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 17:29:00 (GMT) |
commit | 3766f18c524c57784eea7c0001602017d2122156 (patch) | |
tree | 6c24d8ab4a26589c3ee9e5dea3b3cda4ab94e9a6 /Misc/NEWS.d | |
parent | 4b250fc1da9c893803cf724a4974450b5e10bd8a (diff) | |
download | cpython-3766f18c524c57784eea7c0001602017d2122156.zip cpython-3766f18c524c57784eea7c0001602017d2122156.tar.gz cpython-3766f18c524c57784eea7c0001602017d2122156.tar.bz2 |
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).
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-01-21-02-15-20.bpo-35378.4oF03i.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-01-21-02-15-20.bpo-35378.4oF03i.rst b/Misc/NEWS.d/next/Library/2019-01-21-02-15-20.bpo-35378.4oF03i.rst new file mode 100644 index 0000000..bb57f71 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-01-21-02-15-20.bpo-35378.4oF03i.rst @@ -0,0 +1,6 @@ +Fix a reference issue inside :class:`multiprocessing.Pool` that caused +the pool to remain alive if it was deleted without being closed or +terminated explicitly. A new strong reference is added to the pool +iterators to link the lifetime of the pool to the lifetime of its +iterators so the pool does not get destroyed if a pool iterator is +still alive. |