Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
kcenon::common::interfaces::IThreadPoolProvider Interface Referenceabstractexport

Interface for modules that provide thread pool implementations. More...

#include <thread_pool_interface.h>

Collaboration diagram for kcenon::common::interfaces::IThreadPoolProvider:
Collaboration graph

Public Member Functions

virtual ~IThreadPoolProvider ()=default
 
virtual std::shared_ptr< IThreadPoolget_thread_pool ()=0
 Get the default thread pool instance.
 
virtual Result< std::shared_ptr< IThreadPool > > create_thread_pool (size_t worker_count, size_t queue_capacity=0)=0
 Create a new thread pool with specific configuration.
 
virtual ~IThreadPoolProvider ()=default
 
virtual std::shared_ptr< IThreadPoolget_thread_pool ()=0
 
virtual Result< std::shared_ptr< IThreadPool > > create_thread_pool (size_t worker_count, size_t queue_capacity=0)=0
 

Detailed Description

Interface for modules that provide thread pool implementations.

Definition at line 162 of file executor.cppm.

Constructor & Destructor Documentation

◆ ~IThreadPoolProvider() [1/2]

virtual kcenon::common::interfaces::IThreadPoolProvider::~IThreadPoolProvider ( )
virtualdefault

◆ ~IThreadPoolProvider() [2/2]

virtual kcenon::common::interfaces::IThreadPoolProvider::~IThreadPoolProvider ( )
exportvirtualdefault

Member Function Documentation

◆ create_thread_pool() [1/2]

virtual Result< std::shared_ptr< IThreadPool > > kcenon::common::interfaces::IThreadPoolProvider::create_thread_pool ( size_t worker_count,
size_t queue_capacity = 0 )
pure virtual

Create a new thread pool with specific configuration.

Parameters
worker_countNumber of worker threads
queue_capacityMaximum queue size (0 = unlimited)
Returns
Result containing the thread pool or error

◆ create_thread_pool() [2/2]

virtual Result< std::shared_ptr< IThreadPool > > kcenon::common::interfaces::IThreadPoolProvider::create_thread_pool ( size_t worker_count,
size_t queue_capacity = 0 )
exportpure virtual

◆ get_thread_pool() [1/2]

virtual std::shared_ptr< IThreadPool > kcenon::common::interfaces::IThreadPoolProvider::get_thread_pool ( )
pure virtual

Get the default thread pool instance.

Returns
Shared pointer to the thread pool

◆ get_thread_pool() [2/2]

virtual std::shared_ptr< IThreadPool > kcenon::common::interfaces::IThreadPoolProvider::get_thread_pool ( )
exportpure virtual

The documentation for this interface was generated from the following files: