|
HikoGUI
A low latency retained GUI
|
#include <hikogui/scoped_task.hpp>
Data Structures | |
| struct | promise_type |
Public Types | |
| using | value_type = void |
| using | return_value_type = std::variant<std::monostate, std::exception_ptr, std::monostate> |
| The return value type. | |
| using | return_value_ptr_type = std::shared_ptr<return_value_type> |
| using | const_return_value_ptr_type = std::shared_ptr<return_value_type const> |
| using | notifier_type = notifier<void()> |
| using | handle_type = std::coroutine_handle<promise_type> |
Public Member Functions | |
| scoped_task (handle_type coroutine, const_return_value_ptr_type value_ptr) noexcept | |
| scoped_task (scoped_task const &)=delete | |
| scoped_task & | operator= (scoped_task const &)=delete |
| scoped_task (scoped_task &&other) noexcept | |
| scoped_task & | operator= (scoped_task &&other) noexcept |
| bool | completed () const noexcept |
| operator bool () const noexcept | |
| void | value () const |
| Get the return value returned from co_return. | |
| notifier_type::token_type | subscribe (std::invocable<> auto &&callback) noexcept |
| using v1::scoped_task< void >::return_value_type = std::variant<std::monostate, std::exception_ptr, std::monostate> |
The return value type.
This value is shared between the promise and the scoped_task. The variant has three different states:
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inline |
Get the return value returned from co_return.
| The | exception thrown from the co-routine. |