[#BloombergLP-bslmt-ThroughputBenchmark-addThreadGroup-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThroughputBenchmark.adoc[ThroughputBenchmark]::addThreadGroup :relfileprefix: ../../../ :mrdocs: Create a set of threads that repeatedly execute a test function. == Synopsis Declared in `<bslmt_throughputbenchmark.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int addThreadGroup( xref:BloombergLP/bslmt/ThroughputBenchmark/RunFunction.adoc[RunFunction] const& runFunction, int numThreads, xref:BloombergLP/bsls/Types/Int64.adoc[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 [cols="1,4"] |=== | Name| Description | *runFunction* | function each thread repeatedly executes | *numThreads* | number of threads in the group | *busyWorkAmount* | work amount passed to `busyWork` between calls |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#