#include <condition.hpp>
Public Member Functions | |
posix_condition () | |
Constructs a posix_condition. On error throws interprocess_exception. More... | |
~posix_condition () | |
Destroys *this liberating system resources. More... | |
void | notify_one () |
If there is a thread waiting on *this, change that thread's state to ready. More... | |
void | notify_all () |
Change the state of all threads waiting on *this to ready. More... | |
template<typename L > | |
void | wait (L &lock) |
Releases the lock on the posix_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), and then reacquires the lock. More... | |
template<typename L , typename Pr > | |
void | wait (L &lock, Pr pred) |
The same as: while (!pred()) wait(lock) More... | |
template<typename L > | |
bool | timed_wait (L &lock, const boost::posix_time::ptime &abs_time) |
Releases the lock on the posix_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), or until time abs_time is reached, and then reacquires the lock. More... | |
template<typename L , typename Pr > | |
bool | timed_wait (L &lock, const boost::posix_time::ptime &abs_time, Pr pred) |
The same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true;. More... | |
void | do_wait (posix_mutex &mut) |
bool | do_timed_wait (const boost::posix_time::ptime &abs_time, posix_mutex &mut) |
|
inline |
Constructs a posix_condition. On error throws interprocess_exception.
|
inline |
Destroys *this liberating system resources.
References BOOST_ASSERT, and boost::detail::void.
|
inline |
References BOOST_ASSERT, ETIMEDOUT, and boost::interprocess::ipcdetail::ptime_to_timespec().
Referenced by timed_wait().
|
inline |
References BOOST_ASSERT, and boost::detail::void.
Referenced by wait().
|
inline |
Change the state of all threads waiting on *this to ready.
If there are no waiting threads, notify_all() has no effect.
References BOOST_ASSERT, and boost::detail::void.
|
inline |
If there is a thread waiting on *this, change that thread's state to ready.
Otherwise there is no effect.
References BOOST_ASSERT, and boost::detail::void.
|
inline |
Releases the lock on the posix_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), or until time abs_time is reached, and then reacquires the lock.
Returns: false if time abs_time is reached, otherwise true.
References do_timed_wait(), boost::date_time::pos_infin, and wait().
|
inline |
The same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true;.
References do_timed_wait(), boost::date_time::pos_infin, and wait().
|
inline |
Releases the lock on the posix_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), and then reacquires the lock.
References do_wait().
Referenced by timed_wait().
|
inline |
The same as: while (!pred()) wait(lock)
References do_wait().