thrd_detach

Defined in header <threads.h>
int thrd_detach( thrd_t thr );
(since C11)

Detaches the thread identified by thr from the current environment. The resources held by the thread will be freed automatically once the thread exits.

Parameters

thr - identifier of the thread to detach

Return value

thrd_success if successful, thrd_error otherwise.

References

See also

thrd_join
(C11)
blocks until a thread terminates
(function)
C++ documentation for detach

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/c/thread/thrd_detach