race condition in cv::wait()
naked notify
remove unused code