[Pythonmac-SIG] Threading and FrameWork.Application

Just van Rossum just@letterror.com
Mon, 8 Apr 2002 14:53:45 +0200


Jack Jansen wrote:

> Well, the call I'm looking for would definitely have to give up 
> the global interpreter lock before doing the call to give up the 
> CPU. And it turns out GUSI's sleep(0) (or usleep(0), for that 
> matter) does exactly what we want: it allows a threadswitch 
> without further delay.

Why would you even have to think about the GIL when you're in an all-Python
event loop? Or is it that no switching occurs once we're in WaitNextEvent?

(Not pretending to know, I'm only learning about this stuff, too...)

Just