![]() |
OpendTect
6.3
|
Is an alternative to ReadWriteLock. It is a lock which causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking if the lock is available. Because they avoid overhead from operating system process re-scheduling or context switching, spinlocks are efficient if threads are only likely to be blocked for a short period. More...
Public Member Functions | |
| SpinRWLock () | |
| SpinRWLock (const SpinRWLock &) | |
| ~SpinRWLock () | |
| void | readLock () |
| void | readUnlock () |
| void | writeLock () |
| void | writeUnlock () |
| int | count () const |
Protected Attributes | |
| Atomic< int > | count_ |
Is an alternative to ReadWriteLock. It is a lock which causes a thread trying to acquire it to simply wait in a loop ("spin") while repeatedly checking if the lock is available. Because they avoid overhead from operating system process re-scheduling or context switching, spinlocks are efficient if threads are only likely to be blocked for a short period.
| Threads::SpinRWLock::SpinRWLock | ( | ) |
| Threads::SpinRWLock::SpinRWLock | ( | const SpinRWLock & | ) |
| Threads::SpinRWLock::~SpinRWLock | ( | ) |
|
inline |
Only for debugging.
| void Threads::SpinRWLock::readLock | ( | ) |
| void Threads::SpinRWLock::readUnlock | ( | ) |
| void Threads::SpinRWLock::writeLock | ( | ) |
| void Threads::SpinRWLock::writeUnlock | ( | ) |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017