[pygtk] Waiting for a callback to run

Robert Schroll rschroll at gmail.com
Sun Feb 20 01:39:57 WST 2011


Hi all,

I have a multi-threaded GTK application.  There is a mainloop thread 
than handles all the GUI stuff and one or more worker threads for 
computation.  These worker threads can post callbacks with 
gobject.idle_add if they want changes to the GUI.

What I'd like to do is have the worker thread post the callback, idle 
until the callback has completed, and then pick back up its execution. 
Is this possible?  If so, how?  Bonus points if the callback can pass 
information back to the worker thread.

Thanks,
Robert


More information about the pygtk mailing list