[#BloombergLP-bslmt-ThreadUtilImpl-04-create-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtilImpl-04.adoc[ThreadUtilImpl&lt;Platform::PosixThreads&gt;]::create
:relfileprefix: ../../../
:mrdocs:

Create a new thread of program control having platform specific default attributes (i&period;e&period;, &quot;stack size&quot;, &quot;scheduling priority&quot;), that invokes the specified `function` with a single argument specified by `userData`, and load into the specified `threadHandle`, an identifier that may be used to refer to the thread in future calls to this utility&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; The behavior is undefined if the `threadHandle` is 0&period; Note that unless explicitly &quot;detached&quot; (`detach`), a call to `join` must be made once the thread terminates to reclaim any system resources associated with the newly created identifier&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;threadutilimpl&lowbar;pthread&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
create(
    xref:BloombergLP/bslmt/ThreadUtilImpl-04/Handle.adoc[Handle]* threadHandle,
    xref:BloombergLP/bslmt_ThreadFunction.adoc[bslmt&lowbar;ThreadFunction] function,
    void* userData);
----


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