On Mon, 22 Dec 2003, Johannes Jordens wrote: > I hate to ask this as, looking through the archives, there is a lot on > threading...just not the right stuff :) > I'd appreciate it if someone could post some example code that has two > threads, each constructing its own window (i.e. one gtk.mainloop() per > thread).
The rough pattern should be: One thread (usually the main thread) just calls gtk.threads_init(); gtk.mainloop() and that's it. Other threads can do the window modification, processing, etc. Each of those other threads needs to wrap any gtkobject method calls in gtk.threads_enter()/gtk.threads_leave() signal callbacks will be done in the main thread - they will need to do threads_enter/threads_leave I believe. Hope this helps, -- Elliot At the School of Hard Knocks, tuition is always high. _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
