add comments on some of the pthread_exit logic