[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: Fri, 22 Jun 2012 14:04:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 22 June 2012 09:48, Markus Armbruster <address@hidden> wrote:
>> In my opinion, coroutines have been useful for us so far.  Whether they
>> remain useful, or serve us just as a stepping stone towards general
>> threads remains to be seen.
>>From my point of view I've seen a whole pile of problems and not
> really any advantages...

Advantages over what?

>                          I particularly think it's a really bad
> idea to have a complex and potentially race-condition-prone bit
> of infrastructure implemented three different ways rather than
> having one implementation used everywhere -- it's just asking
> for obscure bugs on the non-x86 hosts.

Fair point, but it's an implementation problem, not a fundamental
problem with coroutines.  You *can* implement coroutines portably,
e.g. on top of gthread.

But there's a portability / speed tradeoff.  Kevin already explained we
chose speed over portability initially, and that choice is open to

> Really it just breaks the general rule I prefer to follow that
> you should write your code in the 'mainstream' of an API/platform;
> if you head too close to the shallows you're liable to hit a rock.

It's a good rule.  Like for most rules, there are exceptions.

reply via email to

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