Subject: Re: [boost] Mixing async/sync code thanks to boost::context
From: Christophe Bailly (chbailly_at_[hidden])
Date: 2018-12-12 00:31:37
On Wed, 12 Dec 2018 at 00:35, Gavin Lambert via Boost <boost_at_[hidden]>
> On 12/12/2018 10:30, Christophe Bailly wrote:
> > I am new in this mailing list, I hope this is the right list to post my
> > issue.
> If you have a question about using Boost libraries, then it belongs on
> the Boost-Users list. This list is for development of Boost libraries.
It is not really a question about using library but a question/suggestion
about another possible implementation of async code.
If there is a flaw in my logic, where is the flaw precisely ? I am aware
there is certainly one but so far I don't see honestly. I have posted a
concrete code, it is just a demo for feasibility but it works.
> Async functions can only call other async functions or sync functions
> that are expected to complete immediately (or with only CPU-bound work).
You describe the way it works, I am not convinced that this is the way it
should work. The more I use async/await, the more I wonder if this could
not be done differently.
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).
I just want to understand, nothing else.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk