18 #ifndef LUNCHBOX_TIMEDLOCK_H
19 #define LUNCHBOX_TIMEDLOCK_H
23 #include <boost/noncopyable.hpp>
27 namespace detail {
class TimedLock; }
55 LUNCHBOX_API
void unset();
63 LUNCHBOX_API
bool trySet();
71 LUNCHBOX_API
bool isSet();
74 detail::TimedLock*
const _impl;
77 #endif //LUNCHBOX_TIMEDLOCK_H
Defines export visibility macros for library Lunchbox.
Basic type definitions not provided by the operating system.
A mutex with timeout capabilities.
#define LB_TIMEOUT_INDEFINITE
Constant defining 'wait forever' in methods with wait parameters.
LUNCHBOX_API bool trySet()
Attempt to set the lock.
LUNCHBOX_API void unset()
Release the lock.
LUNCHBOX_API ~TimedLock()
Destruct the lock.
LUNCHBOX_API bool isSet()
Test if the lock is set.
Abstraction layer and common utilities for multi-threaded programming.
LUNCHBOX_API TimedLock()
Construct a new timed lock.
LUNCHBOX_API bool set(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Set the lock.