[Top][All Lists]

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

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

From: Markus Armbruster
Subject: Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption
Date: Wed, 27 Jun 2012 10:33:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Stefan Hajnoczi <address@hidden> writes:

> On Wed, Jun 27, 2012 at 8:59 AM, Peter Maydell <address@hidden> wrote:
>> On 27 June 2012 08:48, Stefan Hajnoczi <address@hidden> wrote:
>>> I'd like to see your code though because I still don't understand why
>>> it relies on the exact yield behavior.  Have you pushed it to a public
>>> git repo?
>> I haven't seen Peter's code either, but his complaint makes sense
>> to me -- the whole point of coroutines is that you can rely on
>> the exact yield behaviour, surely.
> Not if you call coroutine_fn functions - these are explicitly marked
> as functions that yield.  For example block or net I/O.

I think you two are in violent agreement :)

With coroutines, you can rely on the exact yield behavior.  Of course,
that doesn't do you any good unless you know which functions can yield.
We make that easy by giving such functions distinctive names.

Except when we don't:

> The issue here is that there are some block.h functions that are not
> marked coroutine_fn but actually yield if running inside coroutine
> context.  I think we could get rid of them with a little bit of work.

Sounds like a good idea.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]