From: gmcm at hypernet.com (Gordon McMillan)
Date: Wed, 14 Apr 1999 01:47:48 GMT
Subject: threads
In-Reply-To: <Pine.LNX.4.04.9904131722450.14793-100000@england.local.net>
References: <1288080841-20523503@hypernet.com>
            <Pine.LNX.4.04.9904131722450.14793-100000@england.local.net>
Message-ID: <1288067824-21306356@hypernet.com>
X-UID: 830                                                  

Eric Lee Green writes:

> Ah. Okay. So Python is doing user-land threads and not Posix
> (OS-level) threads?

Nope. Those are OS threads. It's just that there's an interpreter 
lock, which only gets released every N byte-code instructions.

Except, of course, that blocking operations (like socket I/O) will 
release the lock before doing their thing, then reacquire it to get 
the stuff back into Python.

Check the archives of the thread-SIG for more than you could ever 
possibly want to know...

> The difference between the two doesn't make a difference for my
> application, but I'd be curious to know in case I ever want to run
> this on an SMP machine (where only OS-level threads are schedulable
> on multiple processors).

Sorry. SMP won't get you any benefit at this stage.
 

- Gordon




