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

`addThread` overloads

== Synopses

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

Begin executing the specified invokable functor in a new thread&period;


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

[.small]#xref:BloombergLP/bslmt/ThreadGroup/addThread-01a.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified thread attributes&period;


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

[.small]#xref:BloombergLP/bslmt/ThreadGroup/addThread-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *functor*
| invokable object executed as the thread entry point
| *attributes*
| properties for the new thread
|===


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