BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::SpinLockGuard Class Reference

#include <bsls_spinlock.h>

Public Member Functions

 SpinLockGuard (SpinLock *lock)
 
 ~SpinLockGuard ()
 
SpinLockrelease ()
 

Detailed Description

This type implements a scoped guard for SpinLock.

See bsls_spinlock

Constructor & Destructor Documentation

◆ 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.

Member Function Documentation

◆ 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: