#include <hikogui/dispatch/task.hpp>
|
|
using | value_type = void |
|
using | notifier_type = notifier<void()> |
|
using | callback_type = notifier_type::callback_type |
|
using | handle_type = std::coroutine_handle<promise_type> |
|
|
| 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.
|
| value_type const & | operator* () const |
| | Get the return value returned from co_return.
|
template<bool DestroyFrame>
class v1::task< void, DestroyFrame >
- See also
- task<>
◆ done()
template<bool DestroyFrame>
| bool v1::task< void, DestroyFrame >::done |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check if the co-routine has completed.
◆ operator co_await()
template<bool DestroyFrame>
| auto v1::task< void, DestroyFrame >::operator co_await |
( |
| ) |
const |
|
inlinenoexcept |
Create an awaiter that can await on this task.
◆ operator*()
| value_type const & v1::task< void, DestroyFrame >::operator* |
( |
| ) |
const |
|
inlinenodiscard |
Get the return value returned from co_return.
- Note
- It is undefined behavior to call this function if the co-routine is incomplete.
- Exceptions
-
| The | exception thrown from the co-routine. |
◆ running()
template<bool DestroyFrame>
| bool v1::task< void, DestroyFrame >::running |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check if the co-routine is running.
◆ started()
template<bool DestroyFrame>
| bool v1::task< void, DestroyFrame >::started |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check if the co-routine was started.
◆ subscribe()
template<bool DestroyFrame>
template<forward_of< void()> Func>
- See also
- notifier<>::subscribe()
◆ value()
template<bool DestroyFrame>
| void v1::task< void, DestroyFrame >::value |
( |
| ) |
const |
|
inline |
Get the return value returned from co_return.
- Note
- It is undefined behavior to call this function if the co-routine is incomplete.
- Exceptions
-
| The | exception thrown from the co-routine. |
The documentation for this class was generated from the following file: