The object automatically co_await-ed at the end of a task. More...
#include "task.h"
Public Member Functions | |
bool | await_ready () const noexcept |
Always suspend at the end of the task. More... | |
void | await_resume () const noexcept |
Function called when this object is co_awaited by the standard library at the end of final_suspend. More... | |
std_coroutine::coroutine_handle | await_suspend (handle_t< R > handle) const noexcept |
The suspension logic of the coroutine when it finishes. More... | |
The object automatically co_await-ed at the end of a task.
Awaitable returned from task::promise_t's final_suspend.
Ensures nested coroutine chains are resolved, and the promise_t cleans up if it needs to.
R | Return type of the task |
Resumes the parent and cleans up its handle if needed
|
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 |
References dpp::detail::task::awaited, dpp::detail::task::dangling, dpp::detail::task::done, and dpp::detail::task::started.