[Spice-devel] [spice-gtk 2/3] coroutine: Track idle notification/emission in struct coroutine

Marc-André Lureau marcandre.lureau at gmail.com
Mon Feb 23 05:56:59 PST 2015


On Mon, Feb 23, 2015 at 1:46 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> I'm not exactly sure what you are suggesting me to do here.

You could have a coroutine protocol to share data owned by the
coroutine, for example:

<<
ptr = coroutine_resume (co)

>> coroutine
ptr = alloc shared struct
yield (ptr)


This only depends on coroutine usage/patterns/protocol.

I wouldn't recommend this though in most cases, since it requires some
kind of synchronization with the coroutine for accessing the
structure.

-- 
Marc-André Lureau


More information about the Spice-devel mailing list