Pothos
0.7.0-gf7fbae99
The Pothos dataflow programming software suite
|
#include <SpinLockRW.hpp>
Public Types | |
typedef Pothos::Util::SharedLock< SpinLockRW > | SharedLock |
Convenient typedef for shared lock type. More... | |
Public Member Functions | |
SpinLockRW (void) | |
Create a new unlocked spin lock. More... | |
bool | try_lock_shared (void) noexcept |
Try to lock shared, return true for lock. More... | |
void | lock_shared (void) noexcept |
Lock for multiple reader access. More... | |
void | unlock_shared (void) noexcept |
Unlock from multiple reader access. More... | |
bool | try_lock (void) noexcept |
Try to lock, return true for lock. More... | |
void | lock (void) noexcept |
Lock for single writer access. More... | |
void | unlock (void) noexcept |
Unlock single writer access. More... | |
A spin lock that supports multiple readers + single writer. This lock is optimized for infrequent writes and frequent reading. Its primarily used in the core library for certain plugin hooks which require write locks during the plugin's loader hooks but then requires almost exclusively reads during runtime operation.
Convenient typedef for shared lock type.
|
inline |
Create a new unlocked spin lock.
|
inlinenoexcept |
Lock for single writer access.
|
inlinenoexcept |
Lock for multiple reader access.
|
inlinenoexcept |
Try to lock, return true for lock.
|
inlinenoexcept |
Try to lock shared, return true for lock.
|
inlinenoexcept |
Unlock single writer access.
|
inlinenoexcept |
Unlock from multiple reader access.