One way of communicating from the worker thread back to the gui thread is to use g_idle_add(), which will call the requested function in the gui thread.
Regards,
Dov
Regards,
Dov
2009/6/29 Vivien Malerba <vmalerba@xxxxxxxxx>
2009/6/29 r <alblas3@xxxxxxxxx>Hi,
I have a gtk program doing now and then a calculation taking a few secs.
To prevent freezing my appl. I want to use for Linux g_thread.
However, this is not supported for Windows in combination with gtk.
No, what is apparently not supported on Win32 is manipulating GTK+ objects from several threads at once. What you can do is have one thread for all the UI (GTK+ objects) and one or more threads for the calculation task(s) and use some thread safe communication mechanisms between the UI thread and the worker thread(s).
Regards,
Vivien
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list