void receive_result(boost::int32_t i) { hpx::util::spinlock::scoped_lock l(result_mutex); if (i > final_result) final_result = i; result_cv.notify_one(); }
void locking_thread_through_constructor() { Lock lock(m,boost::chrono::milliseconds(50)); boost::lock_guard<hpx::lcos::local::mutex> lk(done_mutex); locked=lock.owns_lock(); done=true; done_cond.notify_one(); }
void locking_thread() { Lock lock(m,boost::defer_lock); lock.try_lock_for(boost::chrono::milliseconds(50)); boost::lock_guard<hpx::lcos::local::mutex> lk(done_mutex); locked=lock.owns_lock(); done=true; done_cond.notify_one(); }