[#BloombergLP-bslmt-Mutex-lock]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Mutex.adoc[Mutex]::lock
:relfileprefix: ../../../
:mrdocs:

Acquire a lock on this mutex, blocking if necessary&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;mutex&period;h&gt;`

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

== Description

Acquire a lock on this mutex object&period; If this object is currently locked by a different thread, then suspend execution of the current thread until a lock can be acquired&period; The behavior is undefined if the calling thread already owns the lock on this mutex, and may result in deadlock&period;


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