18 #ifndef LUNCHBOX_CONDITION_H
19 #define LUNCHBOX_CONDITION_H
23 #include <boost/noncopyable.hpp>
27 namespace detail {
class Condition; }
43 LUNCHBOX_API
void lock();
46 LUNCHBOX_API
void unlock();
49 LUNCHBOX_API
void signal();
58 LUNCHBOX_API
void wait();
70 LUNCHBOX_API
bool timedWait(
const uint32_t timeout );
73 detail::Condition*
const _impl;
77 #endif //LUNCHBOX_CONDITION_H
Defines export visibility macros for library Lunchbox.
Basic type definitions not provided by the operating system.
A condition variable and associated lock.
Condition()
Construct a new condition variable.
void unlock()
Unlock the mutex.
bool timedWait(const uint32_t timeout)
Atomically unlock the mutex, wait for a signal and relock the mutex.
void lock()
Lock the mutex.
void broadcast()
Broadcast the condition.
Abstraction layer and common utilities for multi-threaded programming.
void signal()
Signal the condition.
~Condition()
Destruct this condition variable.
void wait()
Atomically unlock the mutex, wait for a signal and relock the mutex.