![]() |
Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The definition of a readers-writer lock. More...
#include <ReadersWriterLock.h>
Public Member Functions | |
| ReadersWriterLock () | |
| Constructor. | |
| virtual | ~ReadersWriterLock () |
| Destructor. | |
| void | lockRead () const |
| Requests access to read a resource. When this function returns, the resource will be safe to read. The calling thread must call releaseRead otherwise deadlocks may occur. | |
| void | releaseRead () const |
| Releases the lock for reading. This must only be called by threads which had previously successfully called lockRead. | |
| void | lockWrite () const |
| Requests access to write a resource. When this function returns, the resource will be safe to write. The calling thread must call releaseWrite otherwise deadlocks will occur. | |
| void | releaseWrite () const |
| Releases the lock for writing. This must only be called by threads which had previously successfully called lockWrite. | |
The definition of a readers-writer lock.
A readers-writer lock can be used to secure a resource for concurrent usage such that multiple readers can safely utilize the resource but writing tasks must have sole access.
1.8.8