ASIO C++20 Coroutines

Awaitable (awaitable<> & use_awaitable) 协程使用 awaitable_thread 来管理协程帧栈并驱动协程的运行。而 Resumable (coro<> & use_coro) 协程利用 awaiterawait_suspend(coroutine_handle<>) 返回协程句柄自动驱动协程执行,这一点上与阿里的 async_simple 机制相同。

C++20 Awaitable Coroutines

awaitable coroutines

awaitable coroutines

C++20 Resumable Coroutines

resumable coroutines

resumable coroutines

Reference