[#BloombergLP-bslmt-MutexImpl-06-tryLock]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/MutexImpl-06.adoc[MutexImpl&lt;Platform::PosixThreads&gt;]::tryLock
:relfileprefix: ../../../
:mrdocs:

Attempt to acquire a lock on this mutex object&period; Return 0 on success, and a non&hyphen;zero value of this object is already locked, or if an error occurs&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;muteximpl&lowbar;pthread&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
tryLock();
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
