[Python-ideas] Concurrency Modules

Sven R. Kunze srkunze at mail.de
Sun Jul 26 13:44:59 CEST 2015


Wow. Thanks, Andrew for this very informative response. I am going to 
integrate your thoughts in to the table later and re-post it again.

Just one question:

On 26.07.2015 12:29, Andrew Barnert wrote:
> It's your choice: just fork, spawn (fork+exec), or spawn a special "server" process to fork copies off. (Except on Windows, where spawn is the only possibility.)
>
> How do you know which one to choose? Well, you have to learn the differences to make a decision. Forking is fastest, and it means some kinds of globals are automatically shared, but it can lead to a variety of problems, especially if you're also using threads (and some libraries may use threads without you knowing about it--especially on OS X, where a variety of Cocoa APIs sometimes use threads and sometimes don't).

If I read the documentation of 
https://docs.python.org/2/library/multiprocessing.html#module-multiprocessing.pool 
for instance, I do not see a way to specify my choice.

There, I pass a function and this function is executed in another 
process/thread. Is that just forking?


More information about the Python-ideas mailing list