JODA
0.13.1 (59b41972)
JSON On-Demand Analysis
|
#include <IOThreadPool.h>
Public Types | |
typedef Worker::IQueue | IQueue |
typedef Worker::OQueue | OQueue |
typedef Worker::IPayload | IPayload |
typedef Worker::OPayload | OPayload |
typedef Worker::WConf | WConf |
Public Member Functions | |
virtual | ~IOThreadPool ()=default |
IOThreadPool (IQueue *iqueue, OQueue *oqueue, WConf conf) | |
IOThreadPool (IQueue *iqueue, OQueue *oqueue, size_t maxThreads, WConf conf) | |
void | forceThreads (size_t threads) override |
size_t | getUsedThreads () const override |
void | wait () |
size_t | getMaxThreads () const override |
void | setMaxThreads (size_t maxThreads) override |
size_t | recommendedThreads () const override |
bool | hasRunningThreads () |
void | setWorkerConfig (const WConf &workerConfig) |
Public Member Functions inherited from IThreadUser | |
IThreadUser (size_t maxThreads) | |
virtual | ~IThreadUser ()=default |
Additional Inherited Members | |
Protected Attributes inherited from IThreadUser | |
size_t | maxThreads |
A templatable threadpool with input and output queues defined by the Worker
typedef Worker::IPayload IOThreadPool< Worker >::IPayload |
typedef Worker::IQueue IOThreadPool< Worker >::IQueue |
typedef Worker::OPayload IOThreadPool< Worker >::OPayload |
typedef Worker::OQueue IOThreadPool< Worker >::OQueue |
typedef Worker::WConf IOThreadPool< Worker >::WConf |
|
virtualdefault |
|
inlineexplicit |
Creates a new IOThreadPool with given IO queues and configuration. The number of threads will be the recommended number of threads for the system.
iqueue | Input queue |
oqueue | Output queue |
conf | Thread config class |
|
inlineexplicit |
Creates a new IOThreadPool with given IO queues and configuration. The number of threads will be as specified by the user
iqueue | Input queue |
oqueue | Output queue |
maxThreads | Maximum number of threads to use in the pool |
conf | Thread config class |
|
inlineoverridevirtual |
Forces the IOThreadPool to use the specified number of threads
threads | number of threads to use |
Implements IThreadUser.
|
inlineoverridevirtual |
Returns the maximum number of threads the IOThreadPool will use
Reimplemented from IThreadUser.
|
inlineoverridevirtual |
Returns the number of threads currently in use
Implements IThreadUser.
|
inline |
Checks if there are still threads running
|
inlineoverridevirtual |
Gets the recommended number of threads for the IOThreadPool template instance
Implements IThreadUser.
|
inlineoverridevirtual |
Sets the maximum number of threads the IOThreadPool will use
maxThreads | maximum number of threads |
Reimplemented from IThreadUser.
|
inline |
|
inline |
Waits (blocking) for all threads to stop working