threads and sleep?

Peter Hansen peter at engcorp.com
Thu Jul 7 18:27:51 EDT 2005


Grant Edwards wrote:
> On 2005-07-06, Peter Hansen <peter at engcorp.com> wrote:
>>Maybe you should consider and explain what you mean by
>>"multiple interpreters"?
> 
> That in a multi-theraded Python program, the code that
> impliments the Python VM is executing "simultaneously" in
> multiple contexts: one for each thread (and possibly one master
> thread).

Okay, this description seems correct.  Multiple threads, multiple 
stacks, therefore multiple contexts and yes, by this definition, 
multiple interpreters.

No "master thread" however.  Just all the threads that are visible in 
"threading.enumerate()", which includes the main thread (that the code 
runs in at startup) and any new ones spawned afterwards.

-Peter



More information about the Python-list mailing list