Scheduling of Threads

Aahz Maruch aahz at panix.com
Fri Oct 20 17:24:23 EDT 2000


In article <39F0AF9F.92B6657F at weihenstephan.org>,
Prof. Peter Stoehr <peter.stoehr at weihenstephan.org> wrote:
>
>I always assumed that the threading of python is independent of the OS
>and is done by python itself.
>But yaybe I've learned somethin new.

It's possible you've been confused by the Global Interpreter Lock that
guarantees that only one Python thread runs concurrently.  However,
Python threads are built on top of OS-level threads, so it's the OS
scheduler that determines which Python thread grabs the lock when a
Python thread releases the lock -- it's even possible that the same
thread will regain the lock.
-- 
                      --- Aahz (Copyright 2000 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"In the end, outside of spy agencies, people are far too trusting and
willing to help."  -- Ira Winkler



More information about the Python-list mailing list