CatapultServer  v0.5.0.1 (Elephant)
catapult::thread::IoThreadPool Class Referenceabstract

Represents a thread pool that shares a single io context across multiple threads. More...

Public Member Functions

virtual ~IoThreadPool ()=default
 
virtual uint32_t numWorkerThreads () const =0
 Gets the number of active worker threads. More...
 
virtual const std::string & tag () const =0
 Gets the friendly name of this thread pool. More...
 
virtual boost::asio::io_context & ioContext ()=0
 Gets the underlying io_context. More...
 
virtual void start ()=0
 
virtual void join ()=0
 Waits for all thread pool threads to exit. More...
 

Detailed Description

Represents a thread pool that shares a single io context across multiple threads.

Constructor & Destructor Documentation

◆ ~IoThreadPool()

virtual catapult::thread::IoThreadPool::~IoThreadPool ( )
virtualdefault

Member Function Documentation

◆ ioContext()

virtual boost::asio::io_context& catapult::thread::IoThreadPool::ioContext ( )
pure virtual

Gets the underlying io_context.

Here is the caller graph for this function:

◆ join()

virtual void catapult::thread::IoThreadPool::join ( )
pure virtual

Waits for all thread pool threads to exit.

◆ numWorkerThreads()

virtual uint32_t catapult::thread::IoThreadPool::numWorkerThreads ( ) const
pure virtual

Gets the number of active worker threads.

◆ start()

virtual void catapult::thread::IoThreadPool::start ( )
pure virtual

Starts the thread pool.

Note
All worker threads will be active when this function returns.

◆ tag()

virtual const std::string& catapult::thread::IoThreadPool::tag ( ) const
pure virtual

Gets the friendly name of this thread pool.


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