THRD_DETACH(3C) Standard C Library Functions THRD_DETACH(3C)

thrd_detachdetach a thread

#include <threads.h>

int
thrd_detach(thrd_t thrd);

The () function causes a thread to be considered detached from the rest of the execution environment. While detached threads are still fully observable, they cannot be joined with, calls to () will fail. In addition, if all non-detached threads have terminated, the program will terminate; detached threads cannot keep a program running. The act of calling thrd_detach() on a thread does not cause it to terminate.

Upon successful completion, the thrd_detach() function returns . Otherwise, it returns , indicating that an error has occurred.

pthread_detach(3C), thrd_create(3C), thrd_join(3C), attributes(7), threads(7)

January 13, 2015 OmniOS