Container System 0.1.0
High-performance C++20 type-safe container framework with SIMD-accelerated serialization
Loading...
Searching...
No Matches
thread_pool_executor.h File Reference

Thread pool executor integration for async operations. More...

#include "task.h"
#include <atomic>
#include <coroutine>
#include <exception>
#include <functional>
#include <future>
#include <memory>
#include <optional>
#include <thread>
#include <type_traits>
Include dependency graph for thread_pool_executor.h:

Go to the source code of this file.

Classes

struct  kcenon::container::async::detail::executor_state< T >
 Shared state for executor-based async operations. More...
 
struct  kcenon::container::async::detail::executor_awaitable< T >
 Awaitable that runs work using an executor or fallback thread. More...
 
class  kcenon::container::async::async_executor_context
 Global executor for async operations. More...
 
class  kcenon::container::async::executor_context_guard
 RAII guard for setting executor context. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::container
 
namespace  kcenon::container::async
 
namespace  kcenon::container::async::detail
 

Typedefs

using kcenon::container::async::executor_ptr = std::nullptr_t
 Executor type for async operations.
 

Functions

template<typename F >
auto kcenon::container::async::detail::make_executor_awaitable (F &&func, executor_ptr executor) -> executor_awaitable< std::invoke_result_t< F > >
 Helper to create executor awaitable.
 

Detailed Description

Thread pool executor integration for async operations.

Provides integration between container_system async operations and common_system's thread pool executor interface.

// Example usage with custom executor:
auto executor = get_custom_executor();
async_container cont(container);
cont.set_executor(executor);
auto result = co_await cont.serialize_async();
See also
kcenon::container::async::executor_awaitable
kcenon::common::interfaces::IExecutor

Definition in file thread_pool_executor.h.