Hi;

On 12 October 2016 at 06:22, <psp...@mail.bg> wrote:

> Hello Colleagues [image: :)] ,
> 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.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to