ttg::resumable_task_state Struct Reference
Documentation
encapsulates the state of the coroutine object visible to the outside world
- Note
- this is the
promise_type
for resumable_task coroutine
Definition at line 79 of file coroutine.h.
Public Types | |
using | handle_type = coroutine_handle< resumable_task_state > |
Public Member Functions | |
resumable_task_state () noexcept=default | |
resumable_task_state (const resumable_task_state &)=delete | |
resumable_task_state & | operator= (const resumable_task_state &)=delete |
resumable_task_state (resumable_task_state &&)=delete | |
resumable_task_state & | operator= (resumable_task_state &&)=delete |
constexpr bool | ready () const |
constexpr bool | completed () const |
ttg::span< event * > | events () |
members mandated by the promise_type concept | |
resumable_task | get_return_object () |
suspend_never | initial_suspend () noexcept |
suspend_always | final_suspend () noexcept |
void | return_void () |
void | unhandled_exception () |
Static Public Attributes | |
constexpr static std::size_t | MaxNumEvents = 20 |
Friends | |
template<std::size_t N> | |
struct | resumable_task_events |
Member Typedef Documentation
◆ handle_type
Definition at line 88 of file coroutine.h.
Constructor & Destructor Documentation
◆ resumable_task_state() [1/3]
|
defaultnoexcept |
◆ resumable_task_state() [2/3]
|
delete |
◆ resumable_task_state() [3/3]
|
delete |
Member Function Documentation
◆ completed()
|
inlineconstexpr |
- Returns
- true if the task is completed
Definition at line 134 of file coroutine.h.
◆ events()
|
inline |
Definition at line 136 of file coroutine.h.
◆ final_suspend()
|
inlinenoexcept |
- Note
- suspend task before destroying it so the runtime can know that the task is completed
Definition at line 99 of file coroutine.h.
◆ get_return_object()
|
inline |
- Note
- start task eagerly
Definition at line 93 of file coroutine.h.
◆ initial_suspend()
|
inlinenoexcept |
- Note
- start task eagerly
Definition at line 96 of file coroutine.h.
◆ operator=() [1/2]
|
delete |
◆ operator=() [2/2]
|
delete |
◆ ready()
|
inlineconstexpr |
- Returns
- true if ready to resume
Definition at line 127 of file coroutine.h.
◆ return_void()
|
inline |
- Note
- start task eagerly
Definition at line 103 of file coroutine.h.
◆ unhandled_exception()
|
inline |
- Note
- start task eagerly
Definition at line 104 of file coroutine.h.
Friends And Related Function Documentation
◆ resumable_task_events
template<std::size_t N>
|
friend |
Definition at line 144 of file coroutine.h.
Member Data Documentation
◆ MaxNumEvents
|
inlinestaticconstexpr |
Definition at line 87 of file coroutine.h.
The documentation for this struct was generated from the following file:
- ttg/ttg/coroutine.h