[#BloombergLP-bslmt-MutexImpl-06-tryLock] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/MutexImpl-06.adoc[MutexImpl<Platform::PosixThreads>]::tryLock :relfileprefix: ../../../ :mrdocs: Attempt to acquire a lock on this mutex object. Return 0 on success, and a non‐zero value of this object is already locked, or if an error occurs. == Synopsis Declared in `<bslmt_muteximpl_pthread.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int tryLock(); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#