Hi All ,<br><br>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. <br>
<br>Thanks,<br>-Arash  <br><div class="gmail_quote"><br>On Mon, Jan 5, 2009 at 7:24 PM, Gabriel Genellina <span dir="ltr"><<a href="mailto:gagsl-py2@yahoo.com.ar">gagsl-py2@yahoo.com.ar</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
En Sat, 03 Jan 2009 11:31:12 -0200, Nick Craig-Wood <<a href="mailto:nick@craig-wood.com" target="_blank">nick@craig-wood.com</a>> escribió:<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
mk <<a href="mailto:mrkafk@gmail.com" target="_blank">mrkafk@gmail.com</a>> wrote:<br>
</blockquote>
<br>
</div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

 The results I got are very different from the benchmark quoted in PEP<br>
 371. On twin Xeon machine the threaded version executed in 5.54 secs,<br>
 while multiprocessing version took over 222 secs to complete!<br>
<br>
 Am I doing smth wrong in code below?<br>
</blockquote>
<br>
Yes!<br>
<br>
The problem with your code is that you never start more than one<br>
process at once in the multiprocessing example.  Just check ps when it<br>
is running and you will see.<br>
</blockquote>
<br></div>
Oh, very good analysis! Those results were worriying me a little.<br>
<br>
-- <br><font color="#888888">
Gabriel Genellina</font><div><div></div><div class="Wj3C7c"><br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>