pthread and race