comparison DEPENDENCIES/generic/include/boost/thread/win32/condition_variable.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
94 return this_thread::interruptible_wait(semaphore,abs_time); 94 return this_thread::interruptible_wait(semaphore,abs_time);
95 } 95 }
96 96
97 bool woken() 97 bool woken()
98 { 98 {
99 unsigned long const woken_result=detail::win32::WaitForSingleObject(wake_sem,0); 99 unsigned long const woken_result=detail::win32::WaitForSingleObjectEx(wake_sem,0,0);
100 BOOST_ASSERT((woken_result==detail::win32::timeout) || (woken_result==0)); 100 BOOST_ASSERT((woken_result==detail::win32::timeout) || (woken_result==0));
101 return woken_result==0; 101 return woken_result==0;
102 } 102 }
103 103
104 friend void intrusive_ptr_add_ref(basic_cv_list_entry * p); 104 friend void intrusive_ptr_add_ref(basic_cv_list_entry * p);
335 return do_wait(m,system_time(abs_time)); 335 return do_wait(m,system_time(abs_time));
336 } 336 }
337 template<typename duration_type> 337 template<typename duration_type>
338 bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration) 338 bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration)
339 { 339 {
340 return do_wait(m,wait_duration.total_milliseconds()); 340 if (wait_duration.is_pos_infinity())
341 {
342 wait(m); // or do_wait(m,detail::timeout::sentinel());
343 return true;
344 }
345 if (wait_duration.is_special())
346 {
347 return true;
348 }
349 return do_wait(m,wait_duration.total_milliseconds());
341 } 350 }
342 351
343 template<typename predicate_type> 352 template<typename predicate_type>
344 bool timed_wait(unique_lock<mutex>& m,boost::system_time const& abs_time,predicate_type pred) 353 bool timed_wait(unique_lock<mutex>& m,boost::system_time const& abs_time,predicate_type pred)
345 { 354 {