I have been looking at the documentation of the gtk.gdk.threads_... functions. (*) at: http://www.pygtk.org/pygtk2reference/gdk-functions.html
There I read under gtk.gdk.threads_init: | Theoretically any time a thread calls a PyGTK method or function it | should bracket the call with the gtk.gdk.threads_enter() and | gtk.gdk.threads_leave() functions. If your application only uses Python | threads then this is not necessary since only the main thread can safely | call PyGTK methods or functions. I thought this was mainly a Windows problem and that for example linux didn't have such problems. I was also wondering if it would be possible to change the signature of gtk.gdk.threads_init to something like: def gtk.gdk.threads_init(autolocking = TRUE). The idea would be that if autolocking is FALSE signal handlers wouldn't be called within a gdk_threads_enter() and gdk_threads_leave() function pair. My experience is that this embedding does little good but can be a serious pain in the bud, often enough being the cause of a deadlock. (*) With much thanks and appreciation to John Finlay who has done a marvelous job. -- Antoon Pardon _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
