#include <completion_latch.hpp>
the implementation defined completion function type
boost::completion_latch::completion_latch |
( |
std::size_t |
count | ) |
|
|
inline |
Constructs a latch with a given count.
template<typename F >
boost::completion_latch::completion_latch |
( |
std::size_t |
count, |
|
|
BOOST_THREAD_RV_REF(F) |
funct |
|
) |
| |
|
inline |
Constructs a latch with a given count and a completion function.
template<typename F >
boost::completion_latch::completion_latch |
( |
std::size_t |
count, |
|
|
void(*)() |
funct |
|
) |
| |
|
inline |
boost::completion_latch::~completion_latch |
( |
| ) |
|
|
inline |
void boost::completion_latch::count_down |
( |
| ) |
|
|
inline |
void boost::completion_latch::count_down_and_wait |
( |
| ) |
|
|
inline |
Decrement the count and notify anyone waiting if we reach zero.
Blocks until the latch has counted down to zero. count must be greater than 0
References around_wait, and count_down().
Referenced by sync().
void boost::completion_latch::reset |
( |
std::size_t |
count | ) |
|
|
inline |
Reset the counter #Requires This method may only be invoked when there are no other threads currently inside the count_down_and_wait() method.
References count.
void boost::completion_latch::signal |
( |
| ) |
|
|
inline |
void boost::completion_latch::sync |
( |
| ) |
|
|
inline |
Resets the latch with the new completion function.
The next time the internal count reaches 0, this function will be invoked. This completion function may only be invoked when there are no other threads currently inside the count_down and wait related functions. It may also be invoked from within the registered completion function. the old completion function if any or noop if
bool boost::completion_latch::try_wait |
( |
void |
| ) |
|
|
inline |
- Returns
- true if the internal counter is already 0, false otherwise
References around_wait.
void boost::completion_latch::wait |
( |
void |
| ) |
|
|
inline |
Blocks until the latch has counted down to zero.
References around_wait.
template<class Rep , class Period >
cv_status boost::completion_latch::wait_for |
( |
const chrono::duration< Rep, Period > & |
rel_time | ) |
|
|
inline |
try to wait for a specified amount of time
- Returns
- whether there is a timeout or not.
References around_wait.
template<class Clock , class Duration >
cv_status boost::completion_latch::wait_until |
( |
const chrono::time_point< Clock, Duration > & |
abs_time | ) |
|
|
inline |
try to wait until the specified time_point is reached
- Returns
- whether there is a timeout or not.
References around_wait.
friend struct around_wait |
|
friend |
The documentation for this class was generated from the following file: