A thread may either be joinable or detached. If a thread is joinable, then another thread can call pthread_join(3) to wait for the
thread to terminate and fetch its exit status. Only when a terminated joinable thread has been joined are the last of its resources
released back to the system. When a detached thread terminates, its resources are automatically released back to the system:
linux的thread有两种属性,分别是joinable和detached。我们看下man对于pthread_create说明里的notes部分:A thread may either be joinable or detached. If a thread is joinable, then another thread can call pthread_join(3) to ...