thread sync by lock code commit