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...
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.
<>
◆ SpinRWLock() [1/2]
Threads::SpinRWLock::SpinRWLock |
( |
| ) |
|
◆ SpinRWLock() [2/2]
Threads::SpinRWLock::SpinRWLock |
( |
const SpinRWLock & |
| ) |
|
◆ ~SpinRWLock()
Threads::SpinRWLock::~SpinRWLock |
( |
| ) |
|
◆ count()
int Threads::SpinRWLock::count |
( |
| ) |
const |
|
inline |
◆ readLock()
void Threads::SpinRWLock::readLock |
( |
| ) |
|
◆ readUnlock()
void Threads::SpinRWLock::readUnlock |
( |
| ) |
|
◆ writeLock()
void Threads::SpinRWLock::writeLock |
( |
| ) |
|
◆ writeUnlock()
void Threads::SpinRWLock::writeUnlock |
( |
| ) |
|
◆ count_
Atomic<int> Threads::SpinRWLock::count_ |
|
protected |