12 Dec
2018
12 Dec
'18
1:10 a.m.
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.