mp-coro main
Coroutine support tools
Public Member Functions | Public Attributes | List of all members
task< T, Allocator >::awaiter Struct Reference

Detailed Description

template<task_value_type T = void, typename Allocator = void>
struct mp_coro::task< T, Allocator >::awaiter

Awaiter type for awaiting the result of a task.

Definition at line 111 of file task.h.

+ Collaboration diagram for task< T, Allocator >::awaiter:

Public Member Functions

bool await_ready () const noexcept
 Returns true if the task's coroutine is already done (suspended at its final suspension point). More...
 
std::coroutine_handle await_suspend (std::coroutine_handle<> h) const noexcept
 Set the current coroutine as this task's continuation, and then resume this task's coroutine. More...
 
decltype(auto) await_resume () const
 Return the value of the task's promise. More...
 

Public Attributes

promise_typepromise
 Reference to the promise object of the task in question. More...
 

Member Function Documentation

◆ await_ready()

bool await_ready ( ) const
inlinenoexcept

Returns true if the task's coroutine is already done (suspended at its final suspension point).

Definition at line 117 of file task.h.

+ Here is the caller graph for this function:

◆ await_suspend()

std::coroutine_handle await_suspend ( std::coroutine_handle<>  h) const
inlinenoexcept

Set the current coroutine as this task's continuation, and then resume this task's coroutine.

Definition at line 124 of file task.h.

+ Here is the caller graph for this function:

◆ await_resume()

decltype(auto) await_resume ( ) const
inline

Return the value of the task's promise.

Definition at line 131 of file task.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ promise

promise_type& promise

Reference to the promise object of the task in question.

Definition at line 113 of file task.h.


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