[Python-Dev] issue 6721 "Locks in python standard library should be sanitized on fork"

Charles-François Natali neologix at free.fr
Mon Aug 29 18:24:29 CEST 2011


> +3 (agreed to Jesse, Antoine and Ask here).
>  The http://bugs.python.org/issue8713 described "non-fork" implementation
> that always uses subprocesses rather than plain forked processes is the
> right way forward for multiprocessing.

I see two drawbacks:
- it will be slower, since the interpreter startup time is
non-negligible (well, normally you shouldn't spawn a new process for
every item, but it should be noted)
- it'll consume more memory, since we lose the COW advantage (even
though it's already limited by the fact that even treating a variable
read-only can trigger an incref, as was noted in a previous thread)

cf


More information about the Python-Dev mailing list