Re: [boost] [asio][coroutine] Intentional synchronization of a single coroutine
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____bo...
Em sex, 9 de ago de 2019 às 18:33, Bjorn Reese via Boost < boost@lists.boost.org> escreveu:
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____bo...
Oliver has a few comments regarding integration between Boost.Asio and Boost.Fiber (for those interested): https://github.com/boostorg/fiber/issues/102 -- Vinícius dos Santos Oliveira https://vinipsmaker.github.io/
participants (2)
-
Bjorn Reese
-
Vinícius dos Santos Oliveira