[#BloombergLP-bslmt-ThreadGroup-addThread-01a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadGroup.adoc[ThreadGroup]::addThread
:relfileprefix: ../../../
:mrdocs:

Begin executing the specified invokable `functor` in a new thread, using the optionally specified thread `attributes`&period; Return 0 on success, and a non&hyphen;zero value 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;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INVOKABLE&gt;
int
addThread(INVOKABLE const& functor);
----


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