[issue23979] Multiprocessing Pool.map pickles arguments passed to workers

Josh Rosenberg report at bugs.python.org
Sat Apr 18 03:47:00 CEST 2015


Josh Rosenberg added the comment:

The Pool workers are created eagerly, not lazily. That is, the fork occurs before map is called, and Python can't know that the objects passed as arguments were inherited in the first place (since they could be created after the Pool was created). If you created worker tasks lazily, then sure, you could fork and use the objects that are inherited, but that's not how Pools work, and they can't work like that if the worker processes process more than one input without eagerly evaluating input sequences (which would introduce other problems).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23979>
_______________________________________


More information about the Python-bugs-list mailing list