|
Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
|
Awaitable that runs work using an executor or fallback thread. More...
#include <thread_pool_executor.h>

Public Member Functions | |
| executor_awaitable (std::function< T()> work, executor_ptr executor) | |
| executor_awaitable (executor_awaitable &&) noexcept=default | |
| executor_awaitable & | operator= (executor_awaitable &&) noexcept=default |
| executor_awaitable (const executor_awaitable &)=delete | |
| executor_awaitable & | operator= (const executor_awaitable &)=delete |
| bool | await_ready () const noexcept |
| void | await_suspend (std::coroutine_handle<> handle) |
| T | await_resume () |
Public Attributes | |
| std::shared_ptr< executor_state< T > > | state_ |
| executor_ptr | executor_ |
Static Private Member Functions | |
| static void | run_in_thread (std::shared_ptr< executor_state< T > > state, std::coroutine_handle<> handle) |
Awaitable that runs work using an executor or fallback thread.
When an executor is provided, submits work to the executor. Otherwise, falls back to std::thread-based execution.
Definition at line 91 of file thread_pool_executor.h.
|
inline |
Definition at line 96 of file thread_pool_executor.h.
|
defaultnoexcept |
|
delete |
|
inlinenodiscardnoexcept |
Definition at line 108 of file thread_pool_executor.h.
|
inline |
Definition at line 163 of file thread_pool_executor.h.
References kcenon::container::async::detail::executor_awaitable< T >::state_.
|
inline |
Definition at line 113 of file thread_pool_executor.h.
References kcenon::container::async::detail::executor_awaitable< T >::executor_, kcenon::container::async::detail::executor_awaitable< T >::run_in_thread(), and kcenon::container::async::detail::executor_awaitable< T >::state_.

|
delete |
|
defaultnoexcept |
|
inlinestaticprivate |
Definition at line 175 of file thread_pool_executor.h.
Referenced by kcenon::container::async::detail::executor_awaitable< T >::await_suspend().

| executor_ptr kcenon::container::async::detail::executor_awaitable< T >::executor_ |
Definition at line 94 of file thread_pool_executor.h.
Referenced by kcenon::container::async::detail::executor_awaitable< T >::await_suspend().
| std::shared_ptr<executor_state<T> > kcenon::container::async::detail::executor_awaitable< T >::state_ |
Definition at line 93 of file thread_pool_executor.h.
Referenced by kcenon::container::async::detail::executor_awaitable< T >::await_resume(), and kcenon::container::async::detail::executor_awaitable< T >::await_suspend().