|
|
| scoped_task (handle_type coroutine) 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 | done () const noexcept |
| | Check if the co-routine has completed.
|
| | operator bool () 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.
|
| callback_token | subscribe (forward_of< callback_proto > auto &&callback, callback_flags flags=callback_flags::synchronous) noexcept |
| | Subscribe a callback for when the co-routine is completed.
|
template<typename T = void>
class v1::scoped_task< T >
A scoped_task.
Like the hi::task instance this implements a asynchronous co-routine task.
If the scoped_task object is destroyed, the potentially non-completed co-routine will be destroyed as well. A scoped_task is a move-only object.
- Template Parameters
-
| T | The type returned by co_return. |