On Monday, July 02, 2007, at 10:54AM, "has" <[EMAIL PROTECTED]> wrote:
>Hi all,
>
>Trying to implement a watchdog thread in a Carbon Event-based  
>application. Trouble is, the thread's sleep() call never seems to  
>return. (10.4.9/PPC/Python 2.5) Demonstration code below:
>
[... snip code ...] 
>
>
>Any ideas?

There is no threading support in the Carbon bindings. The wrapper for 
RunApplicationEventLoop doesn't give up the GIL, which means other Python 
threads don't get a chance to run unless the main thread is actually handling 
events in Python code.

You might be able to get this to work with the autoGIL module, but I don't 
fully trust that approach.

Ronald

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to