Implementation of task::promise_t for void return type.
More...
#include <task.h>
|
void | return_void () const noexcept |
| Function called by the standard library when the coroutine co_returns. More...
|
|
dpp::task< void > | get_return_object () noexcept |
| Function called by the standard library when the coroutine is created. More...
|
|
final_awaiter< void > | final_suspend () const noexcept |
| Function called by the standard library when the coroutine reaches its last suspension point. More...
|
|
std_coroutine::suspend_never | initial_suspend () const noexcept |
| Function called by the standard library when the coroutine is created. More...
|
|
void | unhandled_exception () |
| Function called by the standard library when an exception is thrown and not caught in the coroutine. More...
|
|
template<typename T > |
auto | await_transform (T &&expr) const noexcept(noexcept(co_await_resolve(std::forward< T >(expr)))) |
| Function called whenever co_await is used inside of the task. More...
|
|
Implementation of task::promise_t for void return type.
◆ await_transform()
template<typename T >
auto dpp::detail::task::promise_base::await_transform |
( |
T && |
expr | ) |
const |
|
inlinenoexceptinherited |
Function called whenever co_await is used inside of the task.
- Exceptions
-
- Returns
- proxy_awaiter Returns a proxy awaiter that will check for cancellation on resumption
◆ final_suspend()
Function called by the standard library when the coroutine reaches its last suspension point.
- Returns
- final_awaiter Special object containing the chain resolution and clean-up logic.
◆ get_return_object()
Function called by the standard library when the coroutine is created.
- Returns
- task The coroutine object
◆ initial_suspend()
std_coroutine::suspend_never dpp::detail::task::promise_base::initial_suspend |
( |
| ) |
const |
|
inlinenoexceptinherited |
Function called by the standard library when the coroutine is created.
- Returns
- std::suspend_never Don't suspend, the coroutine starts immediately.
◆ return_void()
Function called by the standard library when the coroutine co_returns.
Does nothing but is required by the standard library.
◆ unhandled_exception()
void dpp::detail::task::promise_base::unhandled_exception |
( |
| ) |
|
|
inlineinherited |
Function called by the standard library when an exception is thrown and not caught in the coroutine.
Stores the exception pointer to rethrow on co_await. If the task object is destroyed and was not cancelled, throw instead
◆ cancelled
std::atomic<bool> dpp::detail::task::promise_base::cancelled = false |
|
inherited |
Whether the task is cancelled or not.
◆ parent
detail::std_coroutine::coroutine_handle dpp::detail::task::promise_base::parent = nullptr |
|
inherited |
Parent coroutine to return to for nested coroutines.
◆ state
State of the task, used to keep track of lifetime and status.