[#BloombergLP-bslmt-ThreadGroup-addThread-0e] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadGroup.adoc[ThreadGroup]::addThread :relfileprefix: ../../../ :mrdocs: Same as the preceding overload, using the specified thread attributes. == Synopsis Declared in `<bslmt_threadgroup.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INVOKABLE> int addThread( INVOKABLE const& functor, xref:BloombergLP/bslmt/ThreadAttributes.adoc[ThreadAttributes] const& attributes); ---- == Description Begin executing the specified invokable `functor` in a new thread, using the specified thread `attributes`. Return 0 on success, and a non‐zero value otherwise. `INVOKABLE` shall be a copy‐constructible type having the equivalent of `void operator()()`. Note that threads are always created joinable, regardless of the mode specified in `attributes`. == Return Value 0 on success, and a non‐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]#