Re: [spice-gtk 3/5] session: don't track open_host_idle source id

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

 



On Tue, Feb 4, 2014 at 2:48 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> On Wed, Jan 22, 2014 at 07:26:49PM +0100, Marc-André Lureau wrote:
>> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
>>
>> In all cases, when the coroutine is resumed, the idle source has been
>> removed.
>
> Are you sure about this? I see some coroutine_yieldto() in error cases in
> open_host_idle_cb (but I always get the coroutine code wrong).
>

but the source is removed there anyway

> Also, the commit which added this code was saying that we could get back to
> the coroutine before the idle runs:
>
> commit 5ed7f06e7c7a9fa9c6b0411debd43793335068ec
> Author: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
> Date:   Sun Dec 23 20:56:09 2012 +0100
>
>     Clean-up idle handler when leaving the open_host_idle()
>
>     An explicit yield back to the channel coroutine when the idle function
>     is still pending will leave it in the background, referencing objects
>     that may no longer exist. Make sure we remove it when
>     channel_open_host() is resumed.
>
> Is this no longer valid?

Yes, I think this I was over-zealous. You shouldn't resume coroutines
at will, depending on their state it might be a wrong thing to do. If
there is a pending resume / return in an idle source, then it's wrong
to resume outside.




-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]