Set the thread to detach state.

Signed-off-by: Yunchao Chen <ytu_cyc@126.com>