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

`create` overloads

== Synopses

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

Create a thread with default attributes and the given entry point&period;


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

[.small]#xref:BloombergLP/bslmt/ThreadUtilImpl-04/create-0f.adoc[_» more&period;&period;&period;_]#

Create a thread with the specified attributes and entry&hyphen;point function&period;


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

[.small]#xref:BloombergLP/bslmt/ThreadUtilImpl-04/create-08.adoc[_» more&period;&period;&period;_]#

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *threadHandle*
| receives an identifier for the new thread
| *function*
| entry&hyphen;point function invoked by the new thread
| *userData*
| sole argument passed to `function`
| *attributes*
| properties for the new thread
|===


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