multi threading in multi processor (computer)

Pierre Barbier de Reuille pierre.barbier at cirad.fr
Wed Feb 9 10:18:06 EST 2005


ajikoe at gmail.com a écrit :
> Hello,
> 
> Is anyone has experiance in running python code to run multi thread
> parallel in multi processor. Is it possible ?
> 
> Can python manage which cpu shoud do every thread?
> 
> Sincerely Yours,
> Pujo
> 

There's just no way you can use Python in a multi-processor environment, 
because the GIL (Global Interpreter Lock) will prevent two threads from 
running concurrently. When I saw this discussed, the Python developper 
were more into multi-process systems when it comes to multi-processors.
I think I even heard some discussion about efficient inter-process 
messaging system, but I can't remember where :o)

Hope it'll help.

Pierre



More information about the Python-list mailing list