2011/7/28 Christoph Hellwig <h...@lst.de>:
> On Wed, Jul 27, 2011 at 01:37:31PM +0100, Stefan Hajnoczi wrote:
>> Coroutines in the block layer [Kevin]
>>  * Programming model to simplify block drivers without blocking QEMU threads
>
> Can anyone explain what the whole point of this is?  It really just is
> a bit of syntactic sugar for the current async state machines.  What does
> it buy us over going for real threading?
>

This has nothing (or few) to do with threads. Instead of splitting
functions in callbacks at every synchronous function it allow to write
more readable code. For instance after changing qcow code from current
to coroutine you remove about 400 lines (about 30%). This will help
maintaining code and develop more complicated optimizations.

About threading you can do threading using AIO and using coroutines.

Frediano

Reply via email to