Re: GTK threads synchronization issues

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

 



Hi;

On 12 October 2016 at 06:22, <pspgen@xxxxxxx> wrote:

Hello Colleagues :) ,
I am working on a major project lately, but the last thing I was experiencing was heavy synchronization issues with g_thred_new.
-
After a while I found out that the problem is because I modify/update application's GUI from the thread.
-
By problems I allude generally application text damages such as showing non-standard characters instead of the widget's intended text, sometimes
even crashes and asserts.
-
Is that correct  and I should not make changes to the GUI inside such thread ?

You *cannot* use GDK or GTK+ API from any other thread except the one that called `gtk_init()` and `gtk_main()`, or `g_application_run()`.

https://developer.gnome.org/gdk3/stable/gdk3-Threads.html

Is there any way I can do that within the thread without ending in a symbolic mess ?

No, there isn't.

The common pattern is to schedule UI changes from separate threads using API like GTask.

Ciao,
 Emmanuele.

--
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux