VMS Help
POSIX Threads, PTHREAD routines, pthread_detach
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Marks a thread object for deletion.
#include <pthread.h>
int
pthread_detach (
pthread_t thread);
thread
Thread object being marked for deletion.
This routine marks the specified thread object to indicate that
storage for the corresponding thread can be reclaimed when
the thread terminates. This includes storage for the thread
argument's return value, as well as the thread object. If thread
has not terminated when this routine is called, this routine does
not cause it to terminate.
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.
You can create a thread already detached by setting its thread
object's detachstate attribute.
The pthread_join() routine also detaches the target thread after
pthread_join() returns successfully.
If an error condition occurs, this routine returns an integer
indicating the type of error. Possible return values are as
follows:
Return Description
0 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()
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.