Question about Python threads

Aahz aahz at
Thu Aug 22 05:28:09 CEST 2002

In article <pan.2002. at>,
Mr. Neutron <nicktsocanos at> wrote:
>  If I understand, only one thread can be in the interpreter at any time.
>Now what I don't understand is being in the interpreter at a time part.

That means pure Python code.  For example:

    x = 1 + 2

However, if you call a C function that releases the global interpreter
lock (GIL), then multiple threads can run concurrently.  Most I/O
functions in Python do this.  For example:

    page = urllib.urlopen('').read()
Aahz (aahz at           <*>

Project Vote Smart:

More information about the Python-list mailing list