Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::interprocess::ipcdetail::posix_condition Class Reference

#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)
 

Constructor & Destructor Documentation

boost::interprocess::ipcdetail::posix_condition::posix_condition ( )
inline

Constructs a posix_condition. On error throws interprocess_exception.

boost::interprocess::ipcdetail::posix_condition::~posix_condition ( )
inline

Destroys *this liberating system resources.

References BOOST_ASSERT, and boost::detail::void.

Member Function Documentation

bool boost::interprocess::ipcdetail::posix_condition::do_timed_wait ( const boost::posix_time::ptime abs_time,
posix_mutex mut 
)
inline
void boost::interprocess::ipcdetail::posix_condition::do_wait ( posix_mutex mut)
inline

References BOOST_ASSERT, and boost::detail::void.

Referenced by wait().

void boost::interprocess::ipcdetail::posix_condition::notify_all ( )
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.

void boost::interprocess::ipcdetail::posix_condition::notify_one ( )
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.

template<typename L >
bool boost::interprocess::ipcdetail::posix_condition::timed_wait ( L &  lock,
const boost::posix_time::ptime abs_time 
)
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().

template<typename L , typename Pr >
bool boost::interprocess::ipcdetail::posix_condition::timed_wait ( L &  lock,
const boost::posix_time::ptime abs_time,
Pr  pred 
)
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().

template<typename L >
void boost::interprocess::ipcdetail::posix_condition::wait ( L &  lock)
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().

template<typename L , typename Pr >
void boost::interprocess::ipcdetail::posix_condition::wait ( L &  lock,
Pr  pred 
)
inline

The same as: while (!pred()) wait(lock)

References do_wait().


The documentation for this class was generated from the following file: