threads and sleep?

Peter Hansen peter at
Wed Jul 6 14:57:15 CEST 2005

Grant Edwards wrote:
> On 2005-07-05, Grant Edwards <grante at> wrote:
>>Or is the Python interpreter actually doing the context
>>switches itself?
> Upon further thought, that just can't be the case.  There has
> to be multiple instances of the intepreter because the
> interpreter can make C system calls that block (thus blocking
> that instance of the interpreter). Other Python threads within
> the program continue to run, so there must be multiple Python
> intepreters.

Maybe you should consider and explain what you mean by "multiple 
interpreters"?  As I understand the concept, and based on my several 
years' old reading of the virtual machine code, I wouldn't say there are 
multiple interpreters.

There's a reason the GIL is the *global* interpreter lock...


More information about the Python-list mailing list