Marks a thread object for deletion.
pthread_detach( thread );
Argument Data Type Accessthread opaque pthread_t read
#includeint pthread_detach ( pthread_t thread);
When a thread object is no longer referenced, call this routine.
The results of this routine are unpredictable if the value of thread refers to a thread object that does not exist.
A thread can be created "pre-detached" using its thread object's detach state attribute. The pthread_join function also detaches the target thread when pthread_join returns successfully.
Return Description0 Successful completion. [EINVAL] The value specified by thread does not refer to a joinable thread. [ESRCH] The value specified by thread cannot be found.
pthread_cancel pthread_create pthread_exit pthread_join