c/thread/thrd detach

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

Return value
thrd_success if successful, thrd_error otherwise.