|
QuantumLibrary
|
Coroutine-compatible spinlock. Used internally for mutexes since threads running coroutines cannot block. More...
#include <quantum_spinlock.h>
Classes | |
| class | Guard |
| class | ReverseGuard |
Public Types | |
| using | TryToLock = std::try_to_lock_t |
Public Member Functions | |
| SpinLock () | |
| Constructor. The object is in the unlocked state. More... | |
| SpinLock (const SpinLock &)=delete | |
| Copy constructor. More... | |
| SpinLock (SpinLock &&)=default | |
| Move constructor. More... | |
| SpinLock & | operator= (const SpinLock &)=delete |
| Copy assignment operator. More... | |
| SpinLock & | operator= (SpinLock &&)=default |
| Move assignment operator. More... | |
| void | lock () |
| Locks this object. More... | |
| bool | tryLock () |
| Attempt to acquire the lock. More... | |
| void | unlock () |
| Unlocks the current object. More... | |
Coroutine-compatible spinlock. Used internally for mutexes since threads running coroutines cannot block.
| using Bloomberg::quantum::SpinLock::TryToLock = std::try_to_lock_t |
|
inline |
Constructor. The object is in the unlocked state.
|
delete |
Copy constructor.
|
default |
Move constructor.
| void Bloomberg::quantum::SpinLock::lock | ( | ) |
Locks this object.
Copy assignment operator.
|
inline |
Attempt to acquire the lock.
|
inline |
Unlocks the current object.