Ami Koren added the comment:

Thanks David. using spawn -  multiprocessing.get_context('spawn').Pool(... - 
does the job . It does has it's flows - fork allows me to share data between 
workers (especially large readonly memory database, which I don't want to 
duplicate for each worker), which spawn (which uses fork-exec python script) 
doesn't. So I'll have to see about that.

I still don't understand why forking has to be done under the worker thread 
context. It doesn't seem like a good design - When forking from a thread you 
can never be sure what is being forked. A better approach seems to be to fork 
missing workers on-demand, synchronous to the main thread. But I probably lack 
the historic context of the multiprocess module.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25829>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to