HikoGUI
Select Version: ⚠️ This documents the main development branch of HikoGUI. It might differ from release versions.
A low latency retained GUI
|
#include <hikogui/dispatch/task.hpp>
Data Structures | |
struct | promise_type |
Public Types | |
using | value_type = void |
using | notifier_type = notifier<void()> |
using | callback_type = notifier_type::callback_type |
using | handle_type = std::coroutine_handle<promise_type> |
Public Member Functions | |
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. | |
void | value () const |
Get the return value returned from co_return. | |
template<forward_of< void()> Func> | |
callback< void()> | subscribe (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept |
auto | operator co_await () const noexcept |
Create an awaiter that can await on this task. | |
|
inlinenoexcept |
Check if the co-routine has completed.
|
inlinenoexcept |
Create an awaiter that can await on this task.
|
inlinenoexcept |
Check if the co-routine is running.
|
inlinenoexcept |
Check if the co-routine was started.
|
inlinenoexcept |
|
inline |
Get the return value returned from co_return.
The | exception thrown from the co-routine. |