This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author max
Recipients davin, docs@python, max
Date 2017-03-12.19:22:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489346541.31.0.816526431745.issue29795@psf.upfronthosting.co.za>
In-reply-to
Content
Somewhat related is this statement from Programming Guidelines:

> When using the spawn or forkserver start methods many types from multiprocessing need to be picklable so that child processes can use them. However, one should generally avoid sending shared objects to other processes using pipes or queues. Instead you should arrange the program so that a process which needs access to a shared resource created elsewhere can inherit it from an ancestor process.

Since on Windows, even "inheritance" is really the same pickle + pipe executed inside CPython, I assume the entire paragraph is intended for UNIX platform only (might be worth clarifying, btw).

On Linux, "inheritance" works faster, and can deal with more complex objects compared to pickle with pipe/queue -- but it's equally true whether it's inheritance through global variables or through arguments to the target function. There's no reason 

So the text I proposed earlier wouldn't conflict with this one. It would just encourage programmers to use function arguments instead of global variables: because it's doesn't matter on Linux but makes the code portable to Windows.
History
Date User Action Args
2017-03-12 19:22:21maxsetrecipients: + max, docs@python, davin
2017-03-12 19:22:21maxsetmessageid: <1489346541.31.0.816526431745.issue29795@psf.upfronthosting.co.za>
2017-03-12 19:22:21maxlinkissue29795 messages
2017-03-12 19:22:21maxcreate