BloombergLP::bslmt::ThreadGroup::addThreads

addThreads overloads

Synopses

Declared in <bslmt_threadgroup.h>

Begin executing the specified invokable functor in new threads.

template<class INVOKABLE>
int
addThreads(
    INVOKABLE const& functor,
    int numThreads);
» more...

Same as the preceding overload, using the specified thread attributes.

template<class INVOKABLE>
int
addThreads(
    INVOKABLE const& functor,
    int numThreads,
    ThreadAttributes const& attributes);
» more...

Return Value

numThreads on success, or the number of threads successfully started otherwise

Parameters

NameDescription
functorinvokable object executed as the thread entry point
numThreadsnumber of new threads to start
attributesproperties for the new threads