Boost logo

Boost :

Subject: Re: [boost] Mixing async/sync code thanks to boost::context
From: Gavin Lambert (boost_at_[hidden])
Date: 2018-12-12 01:10:56


On 12/12/2018 13:31, Christophe Bailly wrote:
> It is not really a question about using library but a question/suggestion
> about another possible implementation of async code.

Which is still a usage of a library.

> The code posted works, is asynchronous though there is a synchronous call
> in the middle (by synchronous I mean the function is written just like a
> synchronous function, nothing to change).

Coroutines look like synchronous code, but they are still asynchronous
because they can be suspended and resumed at yield points. It is still
problematic to block without yielding.

Have a look at the examples provided with Boost.Asio.


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