cpp: fix missing notify_one