RAII guard that acquires and releases a bsls::BslLock.

Synopsis

Declared in <bsls_bsllock.h>

class BslLockGuard;

Description

This class implements a guard for automatically acquiring and releasing the lock on an associated bsls::BslLock object. This mechanism follows the RAII idiom whereby the lock on the BslLock associated with a guard object is acquired upon construction and released upon destruction.

Member Functions

Name

Description

BslLockGuard [constructor]

Create a guard that manages and acquires the specified lock.

~BslLockGuard [destructor]

Destroy this guard and unlock its managed object, if any.

release

Cease managing the current lock without unlocking it.

Created with MrDocs