BloombergLP::bslmt::ThreadUtilImpl<Platform::PosixThreads>::detach

Detach the thread so its resources are reclaimed on termination.

Synopsis

Declared in <bslmt_threadutilimpl_pthread.h>

static
int
detach(Handle& threadHandle);

Description

"Detach" the thread identified by the specified threadHandle, such that when it terminates, the resources associated the thread will automatically be reclaimed. Note that once a thread is "detached", it is no longer possible to join the thread to retrieve the its exit status.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
threadHandlethread to detach