|
libosmscout 0.1
|
This implements a pure C++ Latch providing lock-S (shared) and lock-X (exclusive). More...
#include <ReadWriteLock.h>
Public Member Functions | |
| Latch () | |
| Latch (bool _px) | |
| Latch (const Latch &)=delete | |
| Latch (Latch &&)=delete | |
| void | lock () |
| void | lock_shared () |
| Latch & | operator= (const Latch &)=delete |
| Latch & | operator= (Latch &&)=delete |
| bool | try_lock_shared () |
| void | unlock () |
| void | unlock_shared () |
| ~Latch () | |
This implements a pure C++ Latch providing lock-S (shared) and lock-X (exclusive).
The concept used here allows X requests to be prioritized faster and more smoothly than standard implementations. It uses a no-lock strategy whenever possible and reverts to lock and wait in race condition.
| osmscout::Latch::Latch | ( | ) |
Referenced by Latch(), Latch(), operator=(), and operator=().
|
inlineexplicit |
|
delete |
References Latch().
|
delete |
References Latch().
| osmscout::Latch::~Latch | ( | ) |
| void osmscout::Latch::lock | ( | ) |
References osmscout::X_STEP_0, osmscout::X_STEP_1, osmscout::X_STEP_2, and osmscout::X_STEP_3.
Referenced by operator=(), and osmscout::WriteLock::WriteLock().
| void osmscout::Latch::lock_shared | ( | ) |
References osmscout::X_STEP_0, osmscout::X_STEP_1, and osmscout::X_STEP_2.
Referenced by operator=(), and osmscout::ReadLock::ReadLock().
References Latch(), lock(), lock_shared(), try_lock_shared(), unlock(), and unlock_shared().
| bool osmscout::Latch::try_lock_shared | ( | ) |
References osmscout::X_STEP_0.
Referenced by operator=().
| void osmscout::Latch::unlock | ( | ) |
References osmscout::X_STEP_0, and osmscout::X_STEP_2.
Referenced by operator=().
| void osmscout::Latch::unlock_shared | ( | ) |
References osmscout::X_STEP_1, and osmscout::X_STEP_3.
Referenced by operator=().