Re: Emitting signals from threads
- From: Luca Bacci <luca bacci982 gmail com>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: Mitko Haralanov <voidtrance gmail com>, ML-gtk <gtk-list gnome org>
- Subject: Re: Emitting signals from threads
- Date: Thu, 28 Feb 2019 11:05:05 +0100
Hi, I can't promise I will find a solution but I'll certainly take a look at this
You are right, and I withdraw my remarks. As noted, I didn't read it carefully enough.
But yes, g_idle_add_full() runs in the worker thread, however that's one thing that is always OK.
But that's not how the code is written:
g_task_run_in_thread(obj->task, custom_object_work) ->
custom_object_worker() ->
signal_emit() ->
g_idle_add_full(..., signal_emitter, ...);
signal_emitter() is the function that *actually* emits the signal.
signal_emitter() is supposed to be running in the main context thread
by the virtue of being the g_idle_add_full() callback.
Are you saying that the g_idle_add_full() callback also runs in the
worker thread?
On Wed, Feb 27, 2019 at 4:54 PM Paul Davis <paul linuxaudiosystems com> wrote:
>
>
>
> On Wed, Feb 27, 2019 at 5:46 PM Mitko Haralanov <voidtrance gmail com> wrote:
>>
>> How is that? The update is happening from a callback executed by the
>> main context thread?
>
>
> g_task_run_in_thread(obj->task, custom_object_worker);
>
> custom_object_worker() emits the "updated" signal. the handler modifies the model.
>
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]