- 论坛徽章:
- 0
|
- PTHREAD_DETACH(3) Linux Programmer's Manual PTHREAD_DETACH(3)
- NAME
- pthread_detach - detach a thread
- SYNOPSIS
- #include <pthread.h>
- int pthread_detach(pthread_t thread);
- Compile and link with -pthread.
- DESCRIPTION
- The pthread_detach() function marks the thread identified by thread as detached. When a detached thread
- terminates, its resources are automatically released back to the system without the need for another
- thread to join with the terminated thread.
- Attempting to detach an already detached thread results in unspecified behavior.
复制代码 |
|