Create a set of threads that repeatedly execute a test function.
Synopsis
Declared in <bslmt_throughputbenchmark.h>
int
addThreadGroup(
RunFunction const& runFunction,
int numThreads,
bsls::Types::Int64 busyWorkAmount);
Description
Create a set of threads, with cardinality the specified numThreads, that will repeatedly execute the specified runFunction followed by the specified busyWork, with the specified busyWorkAmount as its argument. Return the index for the thread group. The behavior is undefined unless 0 < numThreads and 0 <= busyWorkAmount.
Return Value
index of the created thread group
Parameters
Name |
Description |
runFunction |
function each thread repeatedly executes |
numThreads |
number of threads in the group |
busyWorkAmount |
work amount passed to |
Created with MrDocs