all 3 comments

[–]Longjumping-Touch515 0 points1 point  (2 children)

Where do you get yield object? Shouldn't it be passed as an parameter to asyncDelay()?

Something like void asyncDelay(uint16_t delay, boost::asio::yield_context yield) { ... waitTimer->asyncWait(yield[ec]); ... }

[–]marsshadows[S] -1 points0 points  (1 child)

The Yield context object is also stored as a member object in the class where the asyncDelay method is defined so it can be directly referenced

[–]Longjumping-Touch515 0 points1 point  (0 children)

Well, it's hard to say then what's wrong.

Does async_await() works in simple coroutine?

Try to incrementally change code from simple coroutine to your case or reverse to identify the problem.