#include <latch.hpp>
boost::latch::latch |
( |
std::size_t |
count | ) |
|
|
inline |
Constructs a latch with a given count.
Destructor Precondition: No threads are waiting or invoking count_down on *this
.
void boost::latch::count_down |
( |
| ) |
|
|
inline |
void boost::latch::count_down_and_wait |
( |
| ) |
|
|
inline |
void boost::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::latch::signal |
( |
| ) |
|
|
inline |
void boost::latch::sync |
( |
| ) |
|
|
inline |
bool boost::latch::try_count_down |
( |
| ) |
|
|
inline |
Effect: Decrement the count if it is > 0 and notify anyone waiting if we reached zero.
Returns: true if count_ was 0 or reached 0.
bool boost::latch::try_wait |
( |
void |
| ) |
|
|
inline |
- Returns
- true if the internal counter is already 0, false otherwise
void boost::latch::wait |
( |
void |
| ) |
|
|
inline |
template<class Rep , class Period >
cv_status boost::latch::wait_for |
( |
const chrono::duration< Rep, Period > & |
rel_time | ) |
|
|
inline |
try to wait for a specified amount of time is elapsed.
- Returns
- whether there is a timeout or not.
template<class Clock , class Duration >
cv_status boost::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 were a timeout or not.
The documentation for this class was generated from the following file: