Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
Loading...
Searching...
No Matches
kcenon::container::async::detail::executor_state< T > Struct Template Reference

Shared state for executor-based async operations. More...

#include <thread_pool_executor.h>

Collaboration diagram for kcenon::container::async::detail::executor_state< T >:
Collaboration graph

Public Member Functions

 executor_state (std::function< T()> work)
 
 executor_state (const executor_state &)=delete
 
executor_stateoperator= (const executor_state &)=delete
 
 executor_state (executor_state &&)=delete
 
executor_stateoperator= (executor_state &&)=delete
 

Public Attributes

std::function< T()> work_
 
std::optional< T > result_
 
std::exception_ptr exception_
 
std::atomic< bool > ready_ {false}
 
std::coroutine_handle continuation_
 

Detailed Description

template<typename T>
struct kcenon::container::async::detail::executor_state< T >

Shared state for executor-based async operations.

This state is shared between the awaitable and the executor using shared_ptr, ensuring thread-safe access.

Definition at line 67 of file thread_pool_executor.h.

Constructor & Destructor Documentation

◆ executor_state() [1/3]

template<typename T >
kcenon::container::async::detail::executor_state< T >::executor_state ( std::function< T()> work)
inlineexplicit

Definition at line 75 of file thread_pool_executor.h.

76 : work_(std::move(work)) {}

◆ executor_state() [2/3]

template<typename T >
kcenon::container::async::detail::executor_state< T >::executor_state ( const executor_state< T > & )
delete

◆ executor_state() [3/3]

template<typename T >
kcenon::container::async::detail::executor_state< T >::executor_state ( executor_state< T > && )
delete

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
executor_state & kcenon::container::async::detail::executor_state< T >::operator= ( const executor_state< T > & )
delete

◆ operator=() [2/2]

template<typename T >
executor_state & kcenon::container::async::detail::executor_state< T >::operator= ( executor_state< T > && )
delete

Member Data Documentation

◆ continuation_

template<typename T >
std::coroutine_handle kcenon::container::async::detail::executor_state< T >::continuation_

Definition at line 73 of file thread_pool_executor.h.

◆ exception_

template<typename T >
std::exception_ptr kcenon::container::async::detail::executor_state< T >::exception_

Definition at line 71 of file thread_pool_executor.h.

◆ ready_

template<typename T >
std::atomic<bool> kcenon::container::async::detail::executor_state< T >::ready_ {false}

Definition at line 72 of file thread_pool_executor.h.

72{false};

◆ result_

template<typename T >
std::optional<T> kcenon::container::async::detail::executor_state< T >::result_

Definition at line 70 of file thread_pool_executor.h.

◆ work_

template<typename T >
std::function<T()> kcenon::container::async::detail::executor_state< T >::work_

Definition at line 69 of file thread_pool_executor.h.


The documentation for this struct was generated from the following file: