multiprocessing vs thread performance

James Mills prologic at shortcircuit.net.au
Thu Jan 8 02:05:53 CET 2009


On Thu, Jan 8, 2009 at 10:55 AM, Arash Arfaee <erexsha at gmail.com> wrote:
> Hi All ,

HI :)

> Does anybody know any tutorial for python 2.6 multiprocessing? Or bunch of
> good example for it? I am trying to break a loop to run it over multiple
> core in a system. And I need to return an integer value as the result of the
> process an accumulate all of them. the examples that I found there is no
> return for the process.

You communicate with the process in one of several
ways:
 * Semaphores
 * Locks
 * PIpes

I prefer to use Pipes which act much like sockets.
(in fact they are).

Read the docs and let us know how you go :)
I'm actually implementing multiprocessing
support into circuits (1) right now...

cheers
James

1. http://trac.softcircuit.com.au/circuits/



More information about the Python-list mailing list