Make sure that the detached thread has started up before exiting
the process.
If the detached thread hasn't started up at all, and the main thread
exists, global data structures in the process are torn down, which
then can cause crashes when the thread starts up late after required
mutexes have been destroyed. (In particular, the mutex used internally
in _Init_thread_header, which is used in the intialization of
thread_local_data()::p, can cause crashes if the main thread already
has finished and progressed far with destruction.)
Can you add a comment?