void wait()
 {
     boost::fibers::mutex::scoped_lock l(m);
     while(!flag)
     {
         cond.wait(l);
     }
 }
Beispiel #2
0
void wait_fn(
	boost::fibers::mutex & mtx,
	boost::fibers::condition & cond)
{
	boost::fibers::mutex::scoped_lock lk( mtx);
	cond.wait( lk);
	++value;
}
Beispiel #3
0
 count_type wait()
 {
     all_futures_lock lk(futures);
     for(;;)
     {
         for(count_type i=0;i<futures.size();++i)
         {
             if(futures[i].future->done)
             {
                 return futures[i].index;
             }
         }
         cv.wait(lk);
     }
 }
 void signal()
 {
     boost::fibers::mutex::scoped_lock l(m);
     flag=true;
     cond.notify_all();
 }
Beispiel #5
0
void notify_all_fn( boost::fibers::condition & cond)
{
	cond.notify_all();
}
Beispiel #6
0
void notify_one_fn( boost::fibers::condition & cond)
{
	cond.notify_one();
}