Detach the thread so its resources are reclaimed on termination.

Synopsis

Declared in <bslmt_threadutil.h>

static
int
detach(Handle& handle);

Description

"Detach" the thread identified by the specified handle such that when it terminates, the resources associated with that thread will automatically be reclaimed. The behavior is undefined unless handle was obtained by a call to create or self. Note that once a thread is "detached", it is no longer possible to join the thread to retrieve its exit status.

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

handle

thread to detach

Created with MrDocs