26 constexpr bool await_ready() const noexcept
31 void await_suspend(std::coroutine_handle<> h)
const noexcept
35 m_handle = h.address();
36 s_task =
const_cast<SuspendTask *
>(
this);
39 void await_resume() const noexcept
45 auto h = std::coroutine_handle<>::from_address(m_handle);
53 static SuspendTask *s_task;
56 mutable void *m_handle =
nullptr;
59SuspendTask *SuspendTask::s_task =
nullptr;
63 co_await SuspendTask();
68 if (SuspendTask::s_task)
69 SuspendTask::s_task->resume();
An asynchronously executed task.