Call pthread_detach() to detach working threads.