drogon
C++14/17-based HTTP application framework
Loading...
Searching...
No Matches
drogon::task_awaiter< Promise > Struct Template Reference

Convert Task to an awaiter when it is co_awaited. Following things will happen: More...

#include <drogon/utils/coroutine.h>

Public Types

using handle_type = std::coroutine_handle<Promise>

Public Member Functions

 task_awaiter (handle_type coro)
bool await_ready () noexcept
auto await_suspend (std::coroutine_handle<> handle) noexcept
auto await_resume ()

Detailed Description

template<typename Promise>
struct drogon::task_awaiter< Promise >

Convert Task to an awaiter when it is co_awaited. Following things will happen:

  1. Suspend current coroutine
  2. Set current coroutine as continuation of this Task
  3. Transfer execution to the co_awaited Task

The documentation for this struct was generated from the following file: