[Spice-devel] Some notes on threading and reference counting on spice-server
Christophe Fergeau
cfergeau at redhat.com
Wed Aug 30 07:11:50 UTC 2017
On Fri, Aug 25, 2017 at 01:07:17PM -0400, Frediano Ziglio wrote:
> Reference counting and owning
> -----------------------------
> -> pointer
> ---> pointer with owning (mostly GObject ref counting)
>
> ChannelClient -> Client
> Client ---> ChannelClient
Something which occurred to me during the night, we have Client owning
objects running in other threads (for example, DisplayChannelClient),
this means among other things that if we were to
g_object_unref(DisplayChannelClient) from the Client thread,
DisplayChannelClient dispose/finalize are going to be run from the
Client thread rather than from the DisplayChannelClient thread. This
could be unexpected. Maybe it would be better if it was Channel which
owned that reference rather than Client?
Christophe
More information about the Spice-devel
mailing list