|
Boost : |
From: Bjorn Reese (breese_at_[hidden])
Date: 2019-08-09 21:33:04
On 8/9/19 9:12 PM, Jared McIntyre via Boost wrote:
> The output is, of course, 0 1 2 3 because the timer effectively acts to
> re-order the calls. What I need is a way for each call to bottleneck() to
> fully complete before the next one starts, and each call occurs in the
> order they were called. This would make the output 3 2 1 0. I also want to
> allow other asynchronous routines on the io_service to run when the
> coroutine is yielding (so no cheating and turning the delay timer into a
> sleep).
This sounds like a job for Boost.Fiber and its Boost.Asio integration:
https://www.boost.org/libs/fiber/doc/html/fiber/callbacks/then_there_s____boost_asio__.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk