#include <bsls_spinlock.h>
This type implements a scoped guard for SpinLock
.
See bsls_spinlock
◆ SpinLockGuard()
bsls::SpinLockGuard::SpinLockGuard |
( |
SpinLock * |
lock | ) |
|
|
inlineexplicit |
Create a proctor object that manages the specified lock
. Invoke lock->lock()
.
◆ ~SpinLockGuard()
bsls::SpinLockGuard::~SpinLockGuard |
( |
| ) |
|
|
inline |
Destroy this proctor object and invoke unlock()
on the lock managed by this object.
◆ release()
SpinLock * bsls::SpinLockGuard::release |
( |
| ) |
|
|
inline |
Return the lock pointer that was provided at construction and stop managing it. (Subsequent calls to release()
will return null and the destruction of this object will not affect the lock.) The lock status is not changed by this call.
The documentation for this class was generated from the following file: