Pothos
0.4.0-gd11861cd
The Pothos dataflow programming software suite
|
#include <ThreadPool.hpp>
Public Member Functions | |
ThreadPoolArgs (void) | |
Create a default ThreadPoolArgs. More... | |
ThreadPoolArgs (const size_t numThreads) | |
Create a ThreadPoolArgs given a specific number of threads. More... | |
ThreadPoolArgs (const std::string &json) | |
Public Attributes | |
size_t | numThreads |
double | priority |
std::string | affinityMode |
std::vector< size_t > | affinity |
A list of CPUs or NUMA nodes (depends on mode setting) More... | |
std::string | yieldMode |
Arguments used to configure a ThreadPool.
Pothos::ThreadPoolArgs::ThreadPoolArgs | ( | void | ) |
Create a default ThreadPoolArgs.
Pothos::ThreadPoolArgs::ThreadPoolArgs | ( | const size_t | numThreads | ) |
Create a ThreadPoolArgs given a specific number of threads.
Pothos::ThreadPoolArgs::ThreadPoolArgs | ( | const std::string & | json | ) |
Create a ThreadPoolArgs from a JSON description. All fields are optional and have defined defaults.
Example JSON markup for a ThreadPoolArgs description:
json | a JSON object markup string |
std::vector<size_t> Pothos::ThreadPoolArgs::affinity |
A list of CPUs or NUMA nodes (depends on mode setting)
std::string Pothos::ThreadPoolArgs::affinityMode |
The affinity mode for this thread pool. The affinityMode string can have the following values:
The default is "ALL".
size_t Pothos::ThreadPoolArgs::numThreads |
The number of threads to create in this pool. The default value is 0, indicating the thread-per-block mechanic. Positive values for numThreads indicate the thread-pool mechanic.
double Pothos::ThreadPoolArgs::priority |
Scheduling priority for all threads in the pool. The value can be in range -1.0 to 1.0. A value of 0.0 is the default thread scheduling. Positive values enable realtime scheduling mode. Negative values enable sub-priority scheduling.
The default is 0.0 (normal).
std::string Pothos::ThreadPoolArgs::yieldMode |
The yieldMode specifies the internal threading mechanisms:
The default is "CONDITION".