BloombergLP::bslmt::QLockGuard::lock

Associate this guard with qlock and acquire the lock.

Synopsis

Declared in <bslmt_qlock.h>

void
lock(QLock* qlock);

Description

Associate this guard with the specified qlock and acquire the lock. If the lock is not free, block until it can be acquired. The behavior is undefined if the calling thread already owns the lock on qlock or if this object is in the locked state.

Parameters

NameDescription
qlockQLock to associate with this guard and lock