A CV is a wait queue attached to a mutex:

std::mutex m;
std::condition_variable cv;
bool ready = false;
 
// Waiter
std::unique_lock<std::mutex> lock(m);
cv.wait(lock, [] { return ready; });  // atomically unlocks, sleeps, re-locks on wake
 
// Signaler
{
  std::lock_guard<std::mutex> lock(m);
  ready = true;
}
cv.notify_one();  // or notify_all()