[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

Inada Naoki report at bugs.python.org
Mon Jan 24 20:55:56 EST 2022


Inada Naoki <songofacandy at gmail.com> added the comment:

> The only way to safely launch worker processes on demand is to spawn a worker launcher process spawned prior to any thread creation that remains idle, with a sole job of spawn new worker processes for us. That sounds complicated. That'd be a feature. Lets go with the bugfix first.

fork is not the only way to launch worker process. We have spawn. And sapwn is the default for macOS since Python 3.8.

Simple reverting seems not good for macOS users, since they need to pay cost for both of pre-spawning and spawn.
Can't we just pre-spawn only when fork is used?

----------
nosy: +methane

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


More information about the Python-bugs-list mailing list