|
OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Code was derived from https://gist.github.com/mshockwave. More...
#include <RWLock.h>
Public Member Functions | |
| RWLock () | |
| void | lockWrite () |
| bool | tryLockWrite () |
| void | unlockWrite () |
| void | lockRead () |
| bool | tryLockRead () |
| void | unlockRead () |
Private Attributes | |
| std::mutex | m_waitMutex |
| std::condition_variable | m_waitConditional |
| std::atomic_int | m_refCounter |
| const int | MIN_INT |
Code was derived from https://gist.github.com/mshockwave.
Has a pure c++11 implementation for read/write locks allowing one to choose the locking technique to use.
At the bottom we added typedefs so you do not have to specify the template values.
Example:
| ossim::RWLock::RWLock | ( | ) |
Definition at line 3 of file RWLock.cpp.
| void ossim::RWLock::lockRead | ( | ) |
| void ossim::RWLock::lockWrite | ( | ) |
| bool ossim::RWLock::tryLockRead | ( | ) |
Definition at line 59 of file RWLock.cpp.
| bool ossim::RWLock::tryLockWrite | ( | ) |
Definition at line 32 of file RWLock.cpp.
| void ossim::RWLock::unlockRead | ( | ) |
| void ossim::RWLock::unlockWrite | ( | ) |
|
private |
1.8.14