BloombergLP::bslmt::QLockGuard::tryLock

Attempt to acquire a lock on the associated QLock without blocking.

Synopsis

Declared in <bslmt_qlock.h>

int
tryLock();

Description

Attempt to acquire a lock on the associated QLock object. Return 0 on success, a positive value if the associated QLock object is already locked, or a negative value if an error occurs.

Return Value

0 on success, a positive value if the associated QLock object is already locked, or a negative value if an error occurs