Re: g_spawn_async in win32



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

2009/6/29 Vivien Malerba <vmalerba gmail com>


2009/6/29 r <alblas3 xs4all nl>

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 gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]