Race condition handling