Example #1
0
File: main.cpp Project: CCJY/coliru
 void drive()
 {
     // do wakeups
     for (unsigned i = 0; i<threads.size(); ++i)
     {
         this_thread::sleep_for(chrono::milliseconds(rand()%100));
         sem.notify();
     }
 }