#include boost::condition_variable x; void Wait(); int main() { boost::thread t = boost::thread(Wait); while(true) x.notify_one(); return 0; } void Wait() { boost::mutex m; boost::unique_lock lock(m); while(true) x.wait(lock); }