[#BloombergLP-bslmt-ThreadUtilImpl-04-join] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThreadUtilImpl-04.adoc[ThreadUtilImpl<Platform::PosixThreads>]::join :relfileprefix: ../../../ :mrdocs: Wait for the specified thread to terminate and reclaim its resources. == Synopsis Declared in `<bslmt_threadutilimpl_pthread.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int join( xref:BloombergLP/bslmt/ThreadUtilImpl-04/Handle.adoc[Handle]& threadHandle, void** status = (void**)0); ---- == Description Suspend execution of the current thread until the thread specified by `threadHandle` terminates, and reclaim any system resources associated with the `threadHandle`. Return 0 on success, and a non‐zero value otherwise. If the optionally specified `status` is not 0, load into the `status` the value returned by the specified `thread`. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *threadHandle* | thread to wait for | *status* | if non‐null, receives the thread's exit status |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#