Options for PSC_ThreadPool.
More...
#include <poser/core/threadpool.h>
Options for PSC_ThreadPool.
This class is for configuring the thread pool. If none of its methods are called, compile-time default values are used.
◆ PSC_ThreadOpts_fixedQueue()
void PSC_ThreadOpts_fixedQueue |
( |
int |
n | ) |
|
|
static |
Set a fixed queue size for waiting thread jobs.
- Parameters
-
◆ PSC_ThreadOpts_fixedThreads()
void PSC_ThreadOpts_fixedThreads |
( |
int |
n | ) |
|
|
static |
Set a fixed numer of threads.
- Parameters
-
n | always create this many threads |
◆ PSC_ThreadOpts_init()
void PSC_ThreadOpts_init |
( |
int |
defThreads | ) |
|
|
static |
Initialize options with default values.
- Parameters
-
defThreads | default number of threads to create when number of CPUs can't be determined |
◆ PSC_ThreadOpts_maxQueue()
void PSC_ThreadOpts_maxQueue |
( |
int |
n | ) |
|
|
static |
Set maximum queue size for waiting thread jobs.
- Parameters
-
n | maximum size of the queue |
◆ PSC_ThreadOpts_maxThreads()
void PSC_ThreadOpts_maxThreads |
( |
int |
n | ) |
|
|
static |
Set maximum number of threads.
- Parameters
-
n | never create more than n threads |
◆ PSC_ThreadOpts_minQueue()
void PSC_ThreadOpts_minQueue |
( |
int |
n | ) |
|
|
static |
Set minimum queue size for waiting thread jobs.
- Parameters
-
n | minimum size of the queue |
◆ PSC_ThreadOpts_queuePerThread()
void PSC_ThreadOpts_queuePerThread |
( |
int |
n | ) |
|
|
static |
Set queue size for waiting jobs per thread.
If no fixed queue size is configured, the queue size will be a multiple of the number of threads created. Default is 2.
- Parameters
-
◆ PSC_ThreadOpts_threadsPerCpu()
void PSC_ThreadOpts_threadsPerCpu |
( |
int |
n | ) |
|
|
static |
Set number of threads per CPU.
If the number of CPUs can be determined and there's no fixed number of threads configured, the number of threads created will be a multiple of the number of CPUs. Default is 1.
- Parameters
-
n | create n threads per detected CPU |
The documentation for this class was generated from the following file: