2009/2/17 John Stowers <[email protected]>
>
> But remember, the callback will be executed in the context of the
> running thread, which means if you intend to touch the gui from this
> thread you will need to get the gtk lock.
>
> That is why I always recommend [1] doing communication from the thread
> to the main application using gobject signals emitted in an idle
> handler. This way it allows you to retain a normal gobject signal based
> design for your app.
>

Yes, my normal way of doing this was to emit gobject signals from the
worker thread, but I never realized that the signal handlers are
called from the same thread as the emitted the signal. I naively
assumed the signals were passed to the gtk.main() loop.

Thanks for informing me about this. Now I have to go apply that
gobject.idle_add() trick in a few places.

Graham
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to