Re: Emitting signals from threads

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

 



On Wed, 27 Feb 2019 09:49:43 -0800
Mitko Haralanov via gtk-list <gtk-list@xxxxxxxxx> wrote:
[snip]
> However, as I understand it, if my signal is running in the main
> context, the signal handler should not be running at the same time as
> Gtk is recalculating/repainting the TreeView. It seems as if the
> threaded signal handler is not running in the main context. The above
> behavior is replicated even if I switched to use g_idle_add() instead
> of g_main_context_invoke_full().

I am not going to try to penetrate your code, and you may already know
this but a GObject signal handler executes in the thread which emits on
the signal.  If this is a GDK/GTK+ signal, this would/should be, in
almost all cases, the thread in which GTK+ runs, namely the thread
of the default main context.

g_idle_add() does not of itself emit a signal.  It executes a callback
in the main loop of the default main context.

Chris
_______________________________________________
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