Class ReaderWriterMutex

Inheritance Relationships

Derived Type

Class Documentation

class aslam::ReaderWriterMutex

Subclassed by aslam::ReaderFirstReaderWriterMutex

Public Functions

ReaderWriterMutex()
virtual ~ReaderWriterMutex()
virtual void acquireReadLock()
void releaseReadLock()
virtual void acquireWriteLock()
virtual void releaseWriteLock()
virtual bool upgradeToWriteLock()
bool isInUse()

Protected Functions

ReaderWriterMutex(const ReaderWriterMutex&) = delete
ReaderWriterMutex &operator=(const ReaderWriterMutex&) = delete

Protected Attributes

std::mutex mutex_
unsigned int pending_readers_
unsigned int num_readers_
std::condition_variable cv_readers_
unsigned int num_pending_writers_
bool current_writer_
std::condition_variable cv_writer_finished_
bool pending_upgrade_