j
k
j a
j l
Anthony Williams: ...
...void f() { barrier->wait(); } int main(void) { barrier.reset(new boost::barrier(2)); boost::thread thread(boost::bind(&f)); barrier->wait(); At this point, there is no guarantee that f() has started.
void f() { barrier->wait(); } int main(void) { barrier.reset(new boost::barrier(2)); boost::thread thread(boost::bind(&f)); barrier->wait();
void f() { barrier->wait(); }
int main(void) { barrier.reset(new boost::barrier(2)); boost::thread thread(boost::bind(&f)); barrier->wait();
At this point, there is no guarantee that f() has started.
Yes there is.
Back to the thread
Back to the list