[#BloombergLP-bslmt-LockGuardTryLock] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::LockGuardTryLock :relfileprefix: ../../ :mrdocs: This class template implements a guard for tentative acquisition and release of synchronization resources (i.e., locks). == Synopsis Declared in `<bslmt_lockguard.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class T> class LockGuardTryLock; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmt/LockGuardTryLock/2constructor.adoc[`LockGuardTryLock`] [.small]#[constructor]# | Create a guard that tries to acquire a lock on `lock`. | xref:BloombergLP/bslmt/LockGuardTryLock/2destructor.adoc[`~LockGuardTryLock`] [.small]#[destructor]# | Destroy this guard and unlock any managed lock. | xref:BloombergLP/bslmt/LockGuardTryLock/ptr.adoc[`ptr`] | Return the address of the modifiable lock object under management by this guard, or 0 if no lock is currently being managed. | xref:BloombergLP/bslmt/LockGuardTryLock/release.adoc[`release`] | Relinquish management of the lock without unlocking it. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmt/TryLockGuard.adoc[`TryLockGuard`] | DEPRECATED: Use `LockGuardTryLock` instead. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#