6b2b9c625f
namely, put the thread to deadqueue rather than just leaking it. - fix a race between pthread_detach/join and pthread_exit, which also causes dead thread leaks.