Re: Some notes on threading and reference counting on spice-server

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

 



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

Interesting point. Actually in master RedChannelClients are ALWAYS
released in the main thread. So, surely is tested.

Not thinking about changing the reference actually. This morning
I was thinking how difficult would be to move the RedWorkers
in another process instead of another thread! Some interesting
though about how the design would break or not and where.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]