|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <threads.h> | ||
int thrd_join(thrd_t thr,int*res); | (since C11) | |
Blocks the current thread until the thread identified bythr finishes execution.
Ifres is not a null pointer, the result code of the thread is put to the location pointed to byres.
The termination of the threadsynchronizes-with the completion of this function.
The behavior is undefined if the thread was previously detached or joined by another thread.
Contents |
| thr | - | identifier of the thread to join |
| res | - | location to put the result code to |
thrd_success if successful,thrd_error otherwise.
(C11) | detaches a thread (function)[edit] |
(C11) | terminates the calling thread (function)[edit] |
C++ documentation forjoin | |