[#BloombergLP-bslmt-ThreadGroup-addThreads-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadGroup.adoc[ThreadGroup]::addThreads
:relfileprefix: ../../../
:mrdocs:

`addThreads` overloads

== Synopses

Declared in `&lt;bslmt&lowbar;threadgroup&period;h&gt;`

Begin executing the specified invokable `functor` in the specified new `numThreads`, using the optionally specified thread `attributes`&period; Return `numThreads` on success, or the number of threads successfully started otherwise&period; `INVOKABLE` shall be a copy&hyphen;constructible type having the equivalent of `void operator()()`&period; Note that threads are always created joinable, regardless of the mode specified in `attributes`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INVOKABLE&gt;
int
xref:BloombergLP/bslmt/ThreadGroup/addThreads-08.adoc[addThreads](
    INVOKABLE const& functor,
    int numThreads);
----

[.small]#xref:BloombergLP/bslmt/ThreadGroup/addThreads-08.adoc[_» more&period;&period;&period;_]#

Begin executing the specified invokable `functor` in the specified new `numThreads`, using the specified thread `attributes`&period; Return `numThreads` on success, or the number of threads successfully started otherwise&period; `INVOKABLE` shall be a copy&hyphen;constructible type having the equivalent of `void operator()()`&period; Note that threads are always created joinable, regardless of the mode specified in `attributes`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INVOKABLE&gt;
int
xref:BloombergLP/bslmt/ThreadGroup/addThreads-02.adoc[addThreads](
    INVOKABLE const& functor,
    int numThreads,
    xref:BloombergLP/bslmt/ThreadAttributes.adoc[ThreadAttributes] const& attributes);
----

[.small]#xref:BloombergLP/bslmt/ThreadGroup/addThreads-02.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
