[docs] [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted
tzickel
report at bugs.python.org
Mon Dec 3 12:31:12 EST 2018
tzickel <icebreak at yahoo.com> added the comment:
The previous posts here touch all this subjects:
A. The documentation explicitly says: "When the pool object is garbage collected terminate() will be called immediately." (Happened till a code refactor 9 years ago introduced this bug).
B. Large amount of code was developed for this technique:
https://github.com/python/cpython/blob/master/Lib/multiprocessing/util.py#L147 (Till the end of the file almost)
C. The reason I opened this bug was because I was called to see why a long running process crashes after a while, and found out it leaked tons of subprocesses / pool._cache memory.
D. The quoted code, will currently simply leak each invocation lots of subprocesses...
I too, think we should push for the said fix.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34172>
_______________________________________
More information about the docs
mailing list