void wait() { boost::fibers::mutex::scoped_lock l(m); while(!flag) { cond.wait(l); } }
void wait_fn( boost::fibers::mutex & mtx, boost::fibers::condition & cond) { boost::fibers::mutex::scoped_lock lk( mtx); cond.wait( lk); ++value; }
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); } }