[Python-3000] Kill GIL?

Nick Coghlan ncoghlan at gmail.com
Mon Sep 18 12:47:08 CEST 2006


Brett Cannon wrote:
> On 9/17/06, *Nick Coghlan* <ncoghlan at gmail.com 
>        - use threads to perform blocking I/O in parallel
>        - use multiple interpreters to perform Python execution in parallel
> 
> 
> Possibly, but as it stands now interpreters just execute in their own 
> Python thread, so there is no real performance boost.  Without the GIL 
> shifting over to per interpreter instead of per process there is going 
> to be the same performance problems as with Python threads.  And 
> changing that would be  hard since objects can be shared between 
> multiple interpreters.

I was thinking it would be easier to split out the Global Interpreter Lock and 
a per-interpreter Local Interpreter Lock, rather than trying to go to a full 
free-threading model. Anyone sharing other objects between interpreters would 
still need their own synchronisation mechanism, but something like 
threading.Queue should suffice for that.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list