A read-write lock class. More...
#include <SRwLock.h>
Public Member Functions | |
SRwLock () | |
Constructor. Initializes a new read-write lock. | |
~SRwLock () | |
Destructor. Destroys the read-write lock. | |
void | LockExclusive () |
Acquires an exclusive lock. | |
void | UnlockExclusive () |
Releases an exclusive lock. | |
void | LockShared () |
Acquires a shared lock. | |
void | UnlockShared () |
Releases a shared lock. | |
A read-write lock class.
This class provides methods to acquire and release shared and exclusive locks.
SRwLock::SRwLock | ( | ) |
Constructor. Initializes a new read-write lock.
Definition at line 189 of file SRwLock.cpp.
SRwLock::~SRwLock | ( | ) |
Destructor. Destroys the read-write lock.
Definition at line 204 of file SRwLock.cpp.
void SRwLock::LockExclusive | ( | ) |
Acquires an exclusive lock.
This method blocks the calling thread until the exclusive lock is available.
Definition at line 208 of file SRwLock.cpp.
void SRwLock::LockShared | ( | ) |
Acquires a shared lock.
This method blocks the calling thread until the shared lock is available.
Definition at line 218 of file SRwLock.cpp.
void SRwLock::UnlockExclusive | ( | ) |
Releases an exclusive lock.
This method releases the exclusive lock, allowing other threads to acquire it.
Definition at line 213 of file SRwLock.cpp.
void SRwLock::UnlockShared | ( | ) |
Releases a shared lock.
This method releases the shared lock, allowing other threads to acquire it.
Definition at line 223 of file SRwLock.cpp.