|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Manager for thread system integration. More...
#include <thread_integration.h>

Classes | |
| class | impl |
| struct | metrics |
| Get thread pool metrics. More... | |
Public Member Functions | |
| void | set_thread_pool (std::shared_ptr< thread_pool_interface > pool) |
| Set the thread pool implementation. | |
| std::shared_ptr< thread_pool_interface > | get_thread_pool () |
| Get the current thread pool. | |
| std::future< void > | submit_task (std::function< void()> task) |
| Submit a task to the thread pool. | |
| std::future< void > | submit_delayed_task (std::function< void()> task, std::chrono::milliseconds delay) |
| Submit a task with delay. | |
| metrics | get_metrics () const |
| Get current metrics. | |
Static Public Member Functions | |
| static thread_integration_manager & | instance () |
| Get the singleton instance. | |
Private Member Functions | |
| thread_integration_manager () | |
| ~thread_integration_manager () | |
Private Attributes | |
| std::shared_ptr< impl > | pimpl_ |
| PIMPL pointer with intentional leak pattern. | |
Manager for thread system integration.
This class manages the integration between network_system and thread pool implementations.
Definition at line 143 of file thread_integration.h.
|
private |
Definition at line 506 of file thread_integration.cpp.
|
privatedefault |
| thread_integration_manager::metrics kcenon::network::integration::thread_integration_manager::get_metrics | ( | ) | const |
Get current metrics.
Definition at line 539 of file thread_integration.cpp.
References pimpl_.
| std::shared_ptr< thread_pool_interface > kcenon::network::integration::thread_integration_manager::get_thread_pool | ( | ) |
Get the current thread pool.
Definition at line 522 of file thread_integration.cpp.
References pimpl_.
Referenced by kcenon::network::integration::ThreadPoolBridge::from_thread_system(), and kcenon::network::integration::messaging_bridge::get_thread_pool_interface().

|
static |
Get the singleton instance.
Definition at line 501 of file thread_integration.cpp.
References instance().
Referenced by kcenon::network::protocols::grpc::grpc_client::impl::call_raw_async(), kcenon::network::integration::ThreadPoolBridge::from_thread_system(), kcenon::network::integration::messaging_bridge::get_thread_pool_interface(), instance(), main(), kcenon::network::utils::memory_profiler::schedule_next_sample(), and kcenon::network::utils::health_monitor::start_monitoring().


| void kcenon::network::integration::thread_integration_manager::set_thread_pool | ( | std::shared_ptr< thread_pool_interface > | pool | ) |
Set the thread pool implementation.
| pool | Thread pool to use |
Definition at line 516 of file thread_integration.cpp.
References pimpl_.
| std::future< void > kcenon::network::integration::thread_integration_manager::submit_delayed_task | ( | std::function< void()> | task, |
| std::chrono::milliseconds | delay ) |
Submit a task with delay.
| task | The task to execute |
| delay | Delay before execution |
Definition at line 532 of file thread_integration.cpp.
References pimpl_.
Referenced by kcenon::network::utils::memory_profiler::schedule_next_sample().

| std::future< void > kcenon::network::integration::thread_integration_manager::submit_task | ( | std::function< void()> | task | ) |
Submit a task to the thread pool.
| task | The task to execute |
Definition at line 526 of file thread_integration.cpp.
References pimpl_.
Referenced by kcenon::network::protocols::grpc::grpc_client::impl::call_raw_async(), and kcenon::network::utils::health_monitor::start_monitoring().

|
private |
PIMPL pointer with intentional leak pattern.
Uses shared_ptr with no-op deleter to prevent heap corruption during static destruction. This is intentional - see docs/DESIGN_DECISIONS.md for detailed rationale.
Definition at line 220 of file thread_integration.h.
Referenced by get_metrics(), get_thread_pool(), set_thread_pool(), submit_delayed_task(), and submit_task().