ext/boost/thread/pthread/condition_variable_fwd.hpp in passenger-3.0.0 vs ext/boost/thread/pthread/condition_variable_fwd.hpp in passenger-3.0.1

- old
+ new

@@ -4,10 +4,11 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-8 Anthony Williams #include <boost/assert.hpp> +#include <boost/throw_exception.hpp> #include <pthread.h> #include <boost/thread/mutex.hpp> #include <boost/thread/locks.hpp> #include <boost/thread/thread_time.hpp> #include <boost/thread/xtime.hpp> @@ -28,11 +29,11 @@ condition_variable() { int const res=pthread_cond_init(&cond,NULL); if(res) { - throw thread_resource_error("Cannot initialize a condition variable", res); + boost::throw_exception(thread_resource_error("Cannot initialize a condition variable", res)); } } ~condition_variable() { int ret; @@ -47,10 +48,11 @@ void wait(unique_lock<mutex>& m,predicate_type pred) { while(!pred()) wait(m); } - bool timed_wait(unique_lock<mutex>& m,boost::system_time const& wait_until); + inline bool timed_wait(unique_lock<mutex>& m, + boost::system_time const& wait_until); bool timed_wait(unique_lock<mutex>& m,xtime const& wait_until) { return timed_wait(m,system_time(wait_until)); }