always block signals in pthread_exit before decrementing thread count