Fix the error because of confusion between go sync condition vs c++ p_thread condition