what if notify() is called before wait()?
I have a situation where a notify() 'can' be called before a wait(). I am trying to make a simulator to schedule its next event when I 'notify' him by sending him messages. So I have devised a wait->notify->scedule chain void Broker::pause() { boost::unique_lock<boost::mutex> lock(m_pause_mutex); { std::cout << "pausing the simulation" << std::endl; m_cond_cnn.wait(lock); std::cout << "Simulation UNpaused" << std::endl; // the following line causes the current function to be called at // a later time, and a notify() can happen before the current function // is called again Simulator::Schedule