[issue39207] concurrent.futures.ProcessPoolExecutor does not properly reap jobs and spawns too many workers

Kyle Stanley report at bugs.python.org
Tue Jan 14 04:43:18 EST 2020


Kyle Stanley <aeros167 at gmail.com> added the comment:

> I think this should be fixed like ThreadPoolExecutor.

Are there are any downsides or complications with changing this behavior for ProcessPoolExecutor to consider, such as what I mentioned above? From my understanding, there would be a performance penalty associated with spawning the processes on-demand as opposed to the current behavior of spawning *max_workers* processes at the same time, and using each of them as needed.

Also, I think it's worth considering the following: do the same arguments for changing the behavior for ThreadPoolExecutor also apply to ProcessPoolExecutor? Although they share the same executor API, they have rather different use cases.

That being said, if it's decided that we do want to make this behavior consistent with ThreadPoolExecutor, I would be willing to look into implementing it. I just want to make sure that it's carefully considered first.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39207>
_______________________________________


More information about the Python-bugs-list mailing list