|
Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
|
Forward declaration of task. More...
#include <task.h>

Classes | |
| struct | awaiter |
| Awaitable interface. More... | |
Public Types | |
| using | promise_type = detail::promise_type<T> |
| using | handle_type = std::coroutine_handle<promise_type> |
Public Member Functions | |
| task () noexcept | |
| Default constructor - creates empty task. | |
| task (handle_type handle) noexcept | |
| Construct from coroutine handle. | |
| task (task &&other) noexcept | |
| Move constructor. | |
| task & | operator= (task &&other) noexcept |
| Move assignment operator. | |
| ~task () | |
| Destructor - destroys the coroutine if owned. | |
| task (const task &)=delete | |
| task & | operator= (const task &)=delete |
| bool | valid () const noexcept |
| Check if task is valid (has a coroutine) | |
| operator bool () const noexcept | |
| Check if task is valid (has a coroutine) | |
| bool | done () const noexcept |
| Check if the coroutine is done. | |
| decltype(auto) | get () & |
| Get the result (blocking, for testing) | |
| decltype(auto) | get () && |
| Get the result (rvalue, blocking, for testing) | |
| awaiter | operator co_await () noexcept |
| Get awaiter for co_await. | |
| void | resume () const |
| Resume the coroutine (for manual execution) | |
Private Attributes | |
| handle_type | handle_ |
Forward declaration of task.
Coroutine task type for async operations.
This is a lazy coroutine type that starts executing when awaited. It supports:
Properties:
| T | The return type of the coroutine |
| using kcenon::container::async::task< T >::handle_type = std::coroutine_handle<promise_type> |
| using kcenon::container::async::task< T >::promise_type = detail::promise_type<T> |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inline |
Destructor - destroys the coroutine if owned.
Definition at line 248 of file task.h.
References kcenon::container::async::task< T >::handle_.
|
delete |
|
inlinenodiscardnoexcept |
Check if the coroutine is done.
Uses atomic flag for thread-safe completion checking. This avoids data races when polling from a different thread than the one executing the coroutine.
Definition at line 283 of file task.h.
References kcenon::container::async::task< T >::handle_.
|
inlinenodiscard |
Get the result (blocking, for testing)
Definition at line 293 of file task.h.
References kcenon::container::async::task< T >::handle_.
|
inlinenodiscard |
Get the result (rvalue, blocking, for testing)
Definition at line 301 of file task.h.
References kcenon::container::async::task< T >::handle_.
|
inlineexplicitnodiscardnoexcept |
Check if task is valid (has a coroutine)
Definition at line 271 of file task.h.
References kcenon::container::async::task< T >::valid().

|
inlinenodiscardnoexcept |
Get awaiter for co_await.
Definition at line 343 of file task.h.
References kcenon::container::async::task< T >::handle_.
|
delete |
|
inlinenoexcept |
|
inline |
|
inlinenodiscardnoexcept |
Check if task is valid (has a coroutine)
Definition at line 263 of file task.h.
References kcenon::container::async::task< T >::handle_.
Referenced by kcenon::container::async::task< T >::operator bool().

|
private |
Definition at line 360 of file task.h.
Referenced by kcenon::container::async::task< T >::done(), kcenon::container::async::task< T >::get(), kcenon::container::async::task< T >::get(), kcenon::container::async::task< T >::operator co_await(), kcenon::container::async::task< T >::operator=(), kcenon::container::async::task< T >::resume(), kcenon::container::async::task< T >::valid(), and kcenon::container::async::task< T >::~task().