Wait for the specified thread to terminate and reclaim its resources.

Synopsis

Declared in <bslmt_threadutilimpl_pthread.h>

static
int
join(
    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

Name

Description

threadHandle

thread to wait for

status

if non‐null, receives the thread's exit status

Created with MrDocs