[issue46871] Lambda can't be pickled with "spawn" and only "fork"

Ronald Oussoren report at bugs.python.org
Mon Feb 28 08:54:49 EST 2022


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The default start method for multirprocessing was changed from "fork" to "spawn" on macOS. This was done because the "fork" method can easily be triggered into causing hard crashes (on macOS), in particular when the parent proces has called higher-level systemen APIs.

The "spawn" method requires pickling the data and callable passed to the child proces, and that's not supported for lambda's.

----------
components: +macOS
nosy: +ned.deily, ronaldoussoren

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


More information about the Python-bugs-list mailing list