39 #ifndef BLOCXX_RWLOCKER_HPP_INCLUDE_GUARD_
40 #define BLOCXX_RWLOCKER_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
44 namespace BLOCXX_NAMESPACE
59 void getReadLock(
const Timeout& timeout);
68 void getWriteLock(
const Timeout& timeout);
74 void releaseReadLock();
79 void releaseWriteLock();
87 bool operator()(Thread_t x, Thread_t y)
const;
104 m_locker->getReadLock(timeout);
115 m_locker->getReadLock(timeout);
123 m_locker->getReadLock(
Timeout::relative(sTimeout + static_cast<float>(usTimeout) * 1000000.0));
131 m_locker->releaseReadLock();
158 m_locker->getWriteLock(timeout);
169 m_locker->getWriteLock(timeout);
177 m_locker->getWriteLock(
Timeout::relative(sTimeout + static_cast<float>(usTimeout) * 1000000.0));
185 m_locker->releaseWriteLock();
ReadLock(RWLocker &locker, const Timeout &timeout)
void getReadLock(const Timeout &timeout)
This class is the implementation of the read/write lock.
void lock(const Timeout &timeout)
const UInt32 INFINITE_TIMEOUT BLOCXX_DEPRECATED
Value that means infinite timeout.
void getWriteLock(const Timeout &timeout)
static Timeout relative(float seconds)
A timeout can be absolute, which means that it will happen at the specified DateTime.
BLOCXX_DEPRECATED void lock(UInt32 sTimeout, UInt32 usTimeout=0)
BLOCXX_DEPRECATED void lock(UInt32 sTimeout, UInt32 usTimeout=0)
WriteLock(RWLocker &locker, const Timeout &timeout)
#define BLOCXX_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
GenericRWLockImpl< Thread_t, ThreadComparer > m_impl
void lock(const Timeout &timeout)