Renamed boost_threads* into boost_thread*.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8777
This commit is contained in:
Bart Van Assche
2008-11-17 17:36:29 +00:00
parent 9a2e5abe9e
commit 76d98e2895
3 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#include <boost/thread/condition.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <iostream>
static boost::condition s_cva;
static boost::mutex s_m;
static void thread_func(void)
{
std::cerr << "Thread 2.\n";
boost::mutex::scoped_lock sl(s_m);
s_cva.notify_all();
s_cva.wait(sl);
}
int main(int argc, char** argv)
{
std::cerr << "Thread 1.\n";
boost::mutex::scoped_lock sl(s_m);
boost::thread t(thread_func);
s_cva.wait(sl);
s_cva.notify_all();
sl.unlock();
t.join();
std::cerr << "Finished.\n";
return 0;
}