I'm not sure if we should check for the result of pthread_join(). But how it was doesn't do that anyway.