thrd_detach(3) Library Functions Manual thrd_detach(3) NAME thrd_detach – detach thread SYNOPSIS library “threads†#include <threads.h> int thrd_detach(thrd_t thrd); DESCRIPTION The function thrd_detach() 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. RETURN VALUES The function thrd_detach() returns thrd_success if the thread has been detached or thrd_error if an error has occurred. SEE ALSO thrd_create(3) thrd_exit(3) thrd_yield(3) thrd_equal(3) thrd_join(3) thrd_current(3) thrd_sleep(3) HISTORY The thrd_equal() function first appeared in the C11 standard ISO/IEC 9899:2011. AUTHORS Jan Adelsbach <jan@jadelsbach.de> Linux 6.13.6-1-default May 9, 2020 Linux 6.13.6-1-default