|
|
| task (handle_type coroutine) noexcept |
| |
|
| task (task const &)=delete |
| |
|
task & | operator= (task const &)=delete |
| |
|
| task (task &&other) noexcept |
| |
|
task & | operator= (task &&other) noexcept |
| |
| bool | started () const noexcept |
| | Check if the co-routine was started.
|
| |
| bool | running () const noexcept |
| | Check if the co-routine is running.
|
| |
| bool | done () const noexcept |
| | Check if the co-routine has completed.
|
| |
| value_type const & | value () const |
| | Get the return value returned from co_return.
|
| |
| value_type const & | operator* () const |
| | Get the return value returned from co_return.
|
| |
| template<forward_of< void(value_type)> Func> |
| callback< void(value_type)> | subscribe (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept |
| | Subscribe a callback for when the co-routine is completed.
|
| |
| auto | operator co_await () const noexcept |
| | Create an awaiter that can await on this task.
|
| |
template<typename T = void, bool DestroyFrame = false>
class v1::task< T, DestroyFrame >
A task.
This implements a asynchronous co-routine task.
- Template Parameters
-
| T | The type returned by co_return. |
| DestroyFrame | Destroy the coroutine frame when task goes out of scope. |