Better fix for the thread exit race on pthreads.

1 file changed