`high overhead of multiple Python processes' (was: Will multithreading make python less popular?)

Paul Rubin http
Sat Feb 21 17:02:27 EST 2009


Joshua Judson Rosen <rozzin at geekspace.com> writes:
> > Right, that's basically the issue here: the cost of using multiple
> > Python processes is unnecessarily high.
> What cost is that? 

The cost of messing with the multiprocessing module instead of having
threads work properly, and the overhead of serializing Python data
structures to send to another process by IPC, instead of using the
same object in two threads.  Also, one way I often use threading is by
sending function objects to another thread through a Queue, so the
other thread can evaluate the function.  I don't think multiprocessing
gives a way to serialize functions, though maybe something like it
can be done at higher nuisance using classes.



More information about the Python-list mailing list