Boost logo

Boost :

Subject: Re: [boost] ASIO into the standard (was: Re: C++ committee meeting report)
From: Nat Goodspeed (nat_at_[hidden])
Date: 2014-07-11 10:47:19


On Tue, Jul 8, 2014 at 10:34 AM, pfultz2 <pfultz2_at_[hidden]> wrote:

> Ideally,
> it would be nice if there were facades that would make an async stream ->
> sync stream, and a sync stream -> async stream.

For such flexibility, you're better off to make all fundamental I/O
operations async.

ASIO already has adapters that can block until any of its async I/O
operation completes. Moreover, you can provide different adapters to
block at varying levels of granularity: block the whole thread, block
the calling fiber, block a coroutine.

But how could you adapt a synchronous operation to be async? Your code
will not regain control until the synchronous operation has completed.
You have no chance to do anything clever in the meantime.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk