bpo-34172: multiprocessing.Pool leaks resources after being deleted by tzickel · Pull Request #8450 · python/cpython
Due to a circular reference inside the Pool implementation, there was a resource leak if the object was not closed/terminated. This patch removes the circular reference, and now the code acts like the documentation.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Oct 2, 2018…ythonGH-8450) Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly. (cherry picked from commit 97bfe8d) Co-authored-by: tzickel <tzickel@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Oct 2, 2018…ythonGH-8450) Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly. (cherry picked from commit 97bfe8d) Co-authored-by: tzickel <tzickel@users.noreply.github.com>
pitrou pushed a commit that referenced this pull request
Oct 2, 2018pitrou pushed a commit that referenced this pull request
Oct 2, 2018pablogsal added a commit that referenced this pull request
Feb 11, 2019Changes 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).
tzickel
mannequin
mentioned this pull request
This file contains hidden or 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