[Spice-devel] [spice-gtk v2] Introduce gtask-helper.[ch]
Christophe Fergeau
cfergeau at redhat.com
Fri May 13 13:32:25 UTC 2016
On Fri, May 13, 2016 at 03:28:11PM +0200, Victor Toso wrote:
> > You would also need more magic to guarantee a coroutine switch before
> > the callback is called in an idle (or are all idles called in the main
> > context? I forgot this). In this case, my understanding is that the code
> > was working before because something between the
> > g_simple_async_result_return_in_idle and the invocation of the idle
> > callback was triggering a coroutine switch.
> >
>
> AFAIK, all callbacks with g_simple_async_result_return_in_idle were
> expecting to be under main context. We don't need to trigger a
> coroutine switch.
If you add some magic to the coroutine code, I'd rather that it works on
all situations... Ie if in the future we create a GTask in the main
context, return from coroutine context, but have no code which is going
to switch coroutine state, what is going to happen? is your added
coroutine magic going to fail over? Do we already have some API in the
coroutine code which have these expectations? (if you use this, trigger
a coroutine switch before next idle is dequeued?)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160513/0da7de57/attachment.sig>
More information about the Spice-devel
mailing list