Adelsbach Enhanced Threading Library

Manual Pages (DD-00013-001)

Enhanced Threading Library > thrd_detach (3)
HTML TXT PDF PS
thrd_detach(3) Library Functions Manual thrd_detach(3)

thrd_detachdetach thread

library “threads”
#include <threads.h>

int
thrd_detach(thrd_t thrd);

The function () will detach the given thread thrd from the execution environment. Detached threads cannot be joined again with thrd_join(3). The application will not terminate until all detached threads have been exited. If the main thread of the application is exited, the application will wait until all detached threads have exited.

The function thrd_detach() returns thrd_success if the thread has been detached or thrd_error if an error has occurred.

thrd_create(3) thrd_exit(3) thrd_yield(3) thrd_equal(3) thrd_join(3) thrd_current(3) thrd_sleep(3)

The thrd_equal() function first appeared in the C11 standard ISO/IEC 9899:2011.

Jan Adelsbach <jan@jadelsbach.de>

May 9, 2020 Debian