[#BloombergLP-bslmt-ThreadUtilImpl-04-create-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtilImpl-04.adoc[ThreadUtilImpl<Platform::PosixThreads>]::create :relfileprefix: ../../../ :mrdocs: `create` overloads == Synopses Declared in `<bslmt_threadutilimpl_pthread.h>` Create a thread with default attributes and the given entry point. [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_ThreadFunction] function, void* userData); ---- [.small]#xref:BloombergLP/bslmt/ThreadUtilImpl-04/create-0f.adoc[_» more..._]# Create a thread with the specified attributes and entry‐point function. [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_ThreadFunction] function, void* userData); ---- [.small]#xref:BloombergLP/bslmt/ThreadUtilImpl-04/create-08.adoc[_» more..._]# == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *threadHandle* | receives an identifier for the new thread | *function* | entry‐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]#