##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# thread_detach

From cppreference.com
< c‎ | thread

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.

### [edit] Parameters

thr | - | identifier of the thread to detach

### [edit] Return value

thrd_success if successful, thrd_error otherwise.

### [edit] See also

thrd_join (C11) | blocks until a thread terminates (function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/thread/thrd_detach&oldid=63554"