[#BloombergLP-bsls-BslLock-lock]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::xref:BloombergLP/bsls/BslLock.adoc[BslLock]::lock
:relfileprefix: ../../../
:mrdocs:

Acquire the lock on this object&period; If the lock on this object is currently held by another thread, then suspend execution of the calling thread until the lock can be acquired&period; The behavior is undefined unless the calling thread does not already hold the lock on this object&period; Note that deadlock may result if this method is invoked while the calling thread holds the lock on the object&period;

== Synopsis

Declared in `&lt;bsls&lowbar;bsllock&period;h&gt;`

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


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