Read/Write Lock for shared access. More...
#include <Thread.h>
Public Member Functions | |
| bool | readLock () |
| bool | tryReadLock () |
| Try the lock for reading, this only block writes. | |
| bool | writeLock () |
| Lock for writing, this blocks reads and all writes. | |
| bool | tryWriteLock () |
| Try the lock for writing, this blocks reads and all writes. | |
| bool | unlock () |
Protected Attributes | |
| pthread_rwlock_t | _lock |
| my pthread rwlock that implements this | |
Read/Write Lock for shared access.
A Read/Write lock that allows multiple readers to gain access to the lock, but only one writer at a time.
This lock is not recursive.
|
inline |
Acquire lock for reading, this only blocks writes not other reads.
|
inline |
Unlock an already acquired lock.
| ©2025 The Foundry Visionmongers, Ltd. All Rights Reserved. |