Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bsls::SpinLockGuard Class Reference

#include <bsls_spinlock.h>

List of all members.

Public Member Functions

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

Detailed Description

This type implements a scoped guard for SpinLock.

See Component bsls_spinlock


Constructor & Destructor Documentation

bsls::SpinLockGuard::SpinLockGuard ( SpinLock lock  )  [explicit]

Create a proctor object that manages the specified lock. Invoke lock->lock().

bsls::SpinLockGuard::~SpinLockGuard (  ) 

Destroy this proctor object and invoke unlock() on the lock managed by this object.


Member Function Documentation

SpinLock* bsls::SpinLockGuard::release (  ) 

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: