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


Public Member Functions | |
| virtual | ~thread_pool_interface ()=default |
| virtual std::future< void > | submit (std::function< void()> task)=0 |
| Submit a task to the thread pool. | |
| virtual std::future< void > | submit_delayed (std::function< void()> task, std::chrono::milliseconds delay)=0 |
| Submit a task with delay. | |
| virtual size_t | worker_count () const =0 |
| Get the number of worker threads. | |
| virtual bool | is_running () const =0 |
| Check if the thread pool is running. | |
| virtual size_t | pending_tasks () const =0 |
| Get pending task count. | |
| virtual | ~thread_pool_interface ()=default |
| virtual void | submit (std::function< void()> task)=0 |
| Submit a task to the thread pool. | |
| virtual size_t | worker_count () const =0 |
| Get the number of worker threads. | |
| virtual bool | is_running () const =0 |
| Check if the thread pool is running. | |
Interface for thread pool integration.
Abstract interface for thread pool integration.
This interface allows network_system to use external thread pool implementations (e.g., from thread_system) for task execution.
This interface allows network_system to work with any thread pool implementation, including the future thread_system module.
|
virtualdefault |
|
exportvirtualdefault |
|
pure virtual |
Check if the thread pool is running.
Implemented in kcenon::network::integration::basic_thread_pool.
|
exportpure virtual |
Check if the thread pool is running.
Implemented in kcenon::network::integration::basic_thread_pool.
|
pure virtual |
Get pending task count.
Implemented in kcenon::network::integration::basic_thread_pool.
|
pure virtual |
Submit a task to the thread pool.
| task | The task to execute |
Implemented in kcenon::network::integration::basic_thread_pool.
Referenced by kcenon::network::core::messaging_quic_client::do_start_impl(), kcenon::network::core::messaging_quic_server::do_start_impl(), kcenon::network::core::messaging_udp_client::do_start_impl(), kcenon::network::core::messaging_udp_server::do_start_impl(), kcenon::network::core::messaging_ws_client::do_start_impl(), kcenon::network::core::messaging_ws_server::do_start_impl(), kcenon::network::core::secure_messaging_client::do_start_impl(), kcenon::network::core::secure_messaging_server::do_start_impl(), kcenon::network::core::secure_messaging_udp_client::do_start_impl(), and kcenon::network::core::secure_messaging_udp_server::start_server().

|
exportpure virtual |
Submit a task to the thread pool.
| task | The task to execute |
Implemented in kcenon::network::integration::basic_thread_pool.
|
pure virtual |
Submit a task with delay.
| task | The task to execute |
| delay | Delay before execution |
Implemented in kcenon::network::integration::basic_thread_pool.
|
pure virtual |
Get the number of worker threads.
Implemented in kcenon::network::integration::basic_thread_pool.
|
exportpure virtual |
Get the number of worker threads.
Implemented in kcenon::network::integration::basic_thread_pool.