Threading in python

Jean-Paul Calderone exarkun at divmod.com
Wed Dec 14 14:44:31 EST 2005


On 14 Dec 2005 10:15:08 -0800, Aahz <aahz at pythoncraft.com> wrote:
>In article <mailman.2101.1134581605.18701.python-list at python.org>,
>Carl J. Van Arsdall <cvanarsdall at mvista.com> wrote:
>
>>Because of this global interpreter lock does this mean its impossible to
>>get speed up with threading on multiple processor systems?  I would
>>think so because only one python thread can execute at any one time.  Is
>>there a way to get around this?  This isn't something I need to do, I'm
>>just curious at this point.
>
>You either need to run multiple processes or run code that mostly calls
>into C libraries that release the GIL.  For example, a threaded spider
>scales nicely on SMP.

Yes.  Nearly as well as a single-threaded spider ;)

Jean-Paul



More information about the Python-list mailing list