QuantumLibrary
Bloomberg::quantum::SpinLock::ReverseGuard Class Reference

#include <quantum_spinlock.h>

Public Member Functions

 ReverseGuard (SpinLock &lock)
 Release the passed-in spinlock. More...
 
 ~ReverseGuard ()
 Acquire the underlying spinlock. More...
 

Constructor & Destructor Documentation

◆ ReverseGuard()

SpinLock::ReverseGuard::ReverseGuard ( SpinLock lock)
inlineexplicit

Release the passed-in spinlock.

Parameters
[in]lockReference to the spinlock to release.

◆ ~ReverseGuard()

SpinLock::ReverseGuard::~ReverseGuard ( )
inline

Acquire the underlying spinlock.

Note
This will block the current thread until the spinlock is acquired.