[pygtk] PyGTK and multithreading
John Finlay
finlay at moeraki.com
Fri Apr 14 02:27:15 WST 2006
Johan Dahlin wrote:
> regis wrote:
>
>> You should call gtk.gdk.threads_init() before gtk.main() to enable
>> threads in your Gtk+ application.
>>
>
> The proper way is to call gobject.threads_init() and doing before any other
> code is executed, eg:
>
> import gobject
> gobject.threads_init()
> import gtk
>
> ...
>
But you also have to call gtk.gdk.threads_init() before calling
gtk.main() to initialize the gdk thread mutex.
John
More information about the pygtk
mailing list