D++ (DPP)
C++ Discord API Bot Library
|
The object automatically co_await-ed at the end of a task. Ensures nested coroutine chains are resolved, and the promise_t cleans up if it needs to. More...
#include <task.h>
Public Member Functions | |
bool | await_ready () const noexcept |
Always suspend at the end of the task. This allows us to clean up and resume the parent. More... | |
std_coroutine::coroutine_handle | await_suspend (handle_t< R > handle) const noexcept |
The suspension logic of the coroutine when it finishes. Always suspend the caller, meaning cleaning up the handle is on us. More... | |
void | await_resume () const noexcept |
Function called when this object is co_awaited by the standard library at the end of final_suspend. Do nothing, return nothing. More... | |
The object automatically co_await-ed at the end of a task. Ensures nested coroutine chains are resolved, and the promise_t cleans up if it needs to.
Awaitable returned from task::promise_t's final_suspend. Resumes the parent and cleans up its handle if needed.
R | Return type of the task |
|
inlinenoexcept |
Always suspend at the end of the task. This allows us to clean up and resume the parent.
|
inlinenoexcept |
Function called when this object is co_awaited by the standard library at the end of final_suspend. Do nothing, return nothing.
|
noexcept |
The suspension logic of the coroutine when it finishes. Always suspend the caller, meaning cleaning up the handle is on us.
handle | The handle of this coroutine |