BloombergLP::bslmt::WriteLockGuard::WriteLockGuard

Constructors

Synopses

Declared in <bslmt_writelockguard.h>

Create a scoped guard that acquires a write lock on lock.

explicit
WriteLockGuard(T* lock);
» more...

Create a scoped guard that conditionally acquires a write lock on lock.

WriteLockGuard(
    T* lock,
    bool alreadyLockedFlag);
» more...

Parameters

NameDescription
locklock object to acquire for writing; may be null
alreadyLockedFlagtrue if lock is already write-locked