multi threading in multi processor (computer)

Aahz aahz at pythoncraft.com
Wed Feb 9 14:09:06 EST 2005


In article <1107961698.225373.247440 at l41g2000cwc.googlegroups.com>,
ajikoe at gmail.com <ajikoe at gmail.com> wrote:
>
>Is anyone has experiance in running python code to run multi thread
>parallel in multi processor. Is it possible ?

Yes.  The GIL prevents multiple Python threads from running
simultaneously, but C extensions can release the GIL; all I/O functions
in the standard library do, so threading Python makes sense for e.g. web
spiders.  See the slides on my website for more info.

>Can python manage which cpu shoud do every thread?

Nope.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death."  --GvR



More information about the Python-list mailing list