Detach thread
#include <pthread.h> int pthread_detach( pthread_t thread );
libc
The pthread_detach() function detaches thread thread. When a detached thread terminates, all system resources allocated to that thread are immediately reclaimed.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
pthread_join(), ThreadDetach().