7#include <condition_variable>
22 std::mutex WriteMutex, ReadMutex;
23 std::atomic_int ReadCounter;
24 std::atomic_bool IsCondVarWaiting;
25 std::condition_variable Cv;
121 template <
class Mutex>
159 template <
class Mutex>
Iterator class for all library maps.
Definition Map.h:18
A class for blocking a stream for reading.
Definition ReadWriteMutex.h:123
~ReadLock()
Destructor.
Definition ReadWriteMutex.h:144
ReadLock(Mutex &mtx)
Constructor.
Definition ReadWriteMutex.h:134
A class for synchronizing threads.
Definition ReadWriteMutex.h:20
ReadWriteMutex() noexcept
Default constructor.
Definition ReadWriteMutex.cpp:5
void ReadLock() noexcept
A method for locking a section of code for reading.
Definition ReadWriteMutex.cpp:16
void WriteLock() noexcept
A method for locking a section of code for writing.
Definition ReadWriteMutex.cpp:42
void WriteUnlock() noexcept
A method for unlocking a section of code for writing.
Definition ReadWriteMutex.cpp:59
void ReadUnlock() noexcept
A method for unlocking a section of code for reading.
Definition ReadWriteMutex.cpp:28
void Disable() noexcept
A function to disable the mutex. It is needed so that you can disable the mutex during inheritance.
Definition ReadWriteMutex.cpp:11
A class for synchronizing threads.
Definition ReadWriteMutex.h:70
void ReadLock() noexcept
A method for locking a section of code for reading.
Definition ReadWriteMutex.cpp:75
void WriteUnlock() noexcept
A method for unlocking a section of code for writing.
Definition ReadWriteMutex.cpp:120
void WriteLock() noexcept
A method for locking a section of code for writing.
Definition ReadWriteMutex.cpp:103
void Disable() noexcept
A function to disable the mutex. It is needed so that you can disable the mutex during inheritance.
Definition ReadWriteMutex.cpp:70
void ReadUnlock() noexcept
A method for unlocking a section of code for reading.
Definition ReadWriteMutex.cpp:89
A class for blocking a stream for writing.
Definition ReadWriteMutex.h:161
~WriteLock()
Destructor.
Definition ReadWriteMutex.h:182
WriteLock(Mutex &mtx)
Constructor.
Definition ReadWriteMutex.h:172