[#BloombergLP-bslmt-QLockGuard-lock-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/QLockGuard.adoc[QLockGuard]::lock
:relfileprefix: ../../../
:mrdocs:

`lock` overloads

== Synopses

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

Acquire a lock on the associated `QLock`, blocking if necessary&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslmt/QLockGuard/lock-0a.adoc[lock]();
----

[.small]#xref:BloombergLP/bslmt/QLockGuard/lock-0a.adoc[_» more&period;&period;&period;_]#

Associate this guard with `qlock` and acquire the lock&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslmt/QLockGuard/lock-0c.adoc[lock](xref:BloombergLP/bslmt/QLock.adoc[QLock]* qlock);
----

[.small]#xref:BloombergLP/bslmt/QLockGuard/lock-0c.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *qlock*
| QLock to associate with this guard and lock
|===


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