[Pythonmac-SIG] Weird Carbon: gestalt: wxPython issue/bug

Ronald Oussoren ronaldoussoren at mac.com
Fri Feb 5 22:33:44 CET 2010




On 5 feb 2010, at 18:59, Christopher Barker <Chris.Barker at noaa.gov>  
wrote:

>
> > Cocoa's GUI APIs
>> certainly aren't thread-safe - all calls must go through the main
>> thread - and I doubt Carbon's GUI APIs are any different.
>
> Well, we need to be clear about what thread-safe means. None of the  
> wx back-ends are thread safe, I don't know if any GUI toolkit is --  
> it would be nice, but I guess it's just too hard. However, with wx,  
> not-thread-safe means that all call must go through the SAME thread,  
> which may NOT be the MAIN thread.
>
> This is very useful for things like iPython, that let you run an  
> interactive interpreter in the main thread, and all the gui calls  
> are run in another (but all the same one) thread, so you can have an  
> interactive interpreter, and GUI display. This is great for doing  
> interactive plotting with matplotlib, for instance.
>
> Do you really think that Cocoa does not support that? I know there  
> is a Cocoa back-end for Matplotlib, though I don't know for sure if  
> anyone is using with with iPython.

Cocoa does not support this, the main thread has special signifance  
and the GUI runloop must be in that thread.

Ronald

>


More information about the Pythonmac-SIG mailing list