[Spice-devel] [spice-gtk RFC 0/3] coroutine: Make signal/notify coroutine code more robust against unexpected coroutine_init()

Christophe Fergeau cfergeau at redhat.com
Mon Feb 23 04:43:38 PST 2015


On Mon, Feb 23, 2015 at 06:26:44AM -0500, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
> > Hey,
> > 
> > Before the recent rework of disconnect/channel_reset, it was possible to get
> > in a situation where
> > an idle would get queued, then an attempt to emit a signal from coroutine
> > context would be attempted.
> > The first idle would run, call coroutine_init() which would reset the
> > coroutine state, and then the
> 
> I see, what's missing is a warning/abort when doing re-init() on an
> unfinished coroutine.
> 
> GCoroutine, which we hope to depend on soon, will disallow this,
> you'll have to use a different coroutine.
> 
> And the client code could check if a coroutine is finished before
> creating a new one with g_coroutine_resumable(). It could eventually
> try to finish it by yielding in a loop, but this might point to a bug
> depending on how you use the coroutine.

Nope, the coroutine was properly finished when I got the issue, but
there was still a queued signal/notify.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150223/099b934f/attachment.sig>


More information about the Spice-devel mailing list