#include <nCine/Base/Task.h>
template<typename T>
Task struct
Awaitable result of an asynchronous coroutine operation.
When coroutine support is enabled, wraps a std::coroutine_handle and acts as both an awaiter and a coroutine return object yielding a value of type T, with one_T value.
Public types
- struct task_promise
-
using promise_type = task_
promise - using handle_type = std::coroutine_handle<promise_type>
Constructors, destructors, conversion operators
Public functions
- auto await_ready() -> bool
- auto await_suspend(std::coroutine_handle<> handle) -> bool
- auto await_suspend(std::coroutine_handle<promise_type> handle) -> bool
- auto await_resume() -> auto
- auto one_step() -> bool
- Advances the coroutine chain by one step.
Function documentation
template<typename T>
bool nCine:: Task<T>:: one_step()
Advances the coroutine chain by one step.
| Returns | true if the task has more work to do, false once it has finished |
|---|