![]() |
Scanframe Modular Application 0.1.0
|
Wrapper for the pthread_cond mechanism. More...
#include <Condition.h>
Public Types | |
| typedef ::pthread_cond_t * | handle_type |
| Handle type. | |
Public Member Functions | |
| Condition (const std::string &name="") | |
| Constructor. | |
| ~Condition () | |
| Destructor. | |
| bool | wait (Mutex &mutex, const TimeSpec &timeout=TimeSpec()) |
| Waits for a signal with a timeout when a non-zero timeout is passed. | |
| bool | notifyOne () |
| Signals a single thread. | |
| int | notifyAll () |
| Signals all threads. | |
| operator handle_type () | |
| Casting operator. | |
| const Condition & | operator= (const Condition &)=delete |
| Prevent copying. | |
| int | getWaiting () const |
| Returns the amount of threads waiting. | |
| const std::string & | getName () |
Wrapper for the pthread_cond mechanism.
The condition is a single or all thread notification mechanism.
| typedef ::pthread_cond_t* sf::Condition::handle_type |
Handle type.
|
explicit |
Constructor.
| sf::Condition::~Condition | ( | ) |
Destructor.
| const std::string & sf::Condition::getName | ( | ) |
| int sf::Condition::getWaiting | ( | ) | const |
Returns the amount of threads waiting.
| int sf::Condition::notifyAll | ( | ) |
Signals all threads.
| bool sf::Condition::notifyOne | ( | ) |
Signals a single thread.
|
inline |
Casting operator.
Waits for a signal with a timeout when a non-zero timeout is passed.
| mutex | |
| timeout | Timeout applicable when not-zero. |