[#UniqueLock-2constructor-05]
= xref:UniqueLock.adoc[UniqueLock]::UniqueLock
:relfileprefix: ../
:mrdocs:

Acquire a lock on the given mutex, registering it for lock&hyphen;order checking&period;

== Synopsis

Declared in `&lt;sync&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;acquire&lowbar;capability(0x7f9500841658), acquire&lowbar;capability(0x7f9525cc6f38), acquire&lowbar;capability(0x7f950db72248), acquire&lowbar;capability(0x7f951f578768), acquire&lowbar;capability(0x7f950c188db8), acquire&lowbar;capability(0x7f950e1b3b28), acquire&lowbar;capability(0x7f9522ff71f8), acquire&lowbar;capability(0x7f951c782bc8), acquire&lowbar;capability(0x7f951414ed88), acquire&lowbar;capability(0x7f950a0448e8), acquire&lowbar;capability(0x7f9502087a18), acquire&lowbar;capability(0x7f9515b29cf8), acquire&lowbar;capability(0x7f9527a09928), acquire&lowbar;capability(0x7f951c794d38), acquire&lowbar;capability(0x7f95220d6038), acquire&lowbar;capability(0x7f9503cc7bb8), acquire&lowbar;capability(0x7f9527b0c138), acquire&lowbar;capability(0x7f950db4c8b8), acquire&lowbar;capability(0x7f9525eeee38), acquire&lowbar;capability(0x7f9521a99d48), acquire&lowbar;capability(0x7f951f7c2168), acquire&lowbar;capability(0x7f9527a702f8), acquire&lowbar;capability(0x7f9500b1bcb8), acquire&lowbar;capability(0x7f950f390ff8), acquire&lowbar;capability(0x7f950345fd98), acquire&lowbar;capability(0x7f950833b5f8), acquire&lowbar;capability(0x7f95039cdd08), acquire&lowbar;capability(0x7f9513c15ae8), acquire&lowbar;capability(0x7f950fa3c258), acquire&lowbar;capability(0x7f94f8958b28), acquire&lowbar;capability(0x7f951d592d38), acquire&lowbar;capability(0x7f951715c898), acquire&lowbar;capability(0x7f95088b2678), acquire&lowbar;capability(0x7f951e622948), acquire&lowbar;capability(0x7f950f8a7ff8), acquire&lowbar;capability(0x7f94f08882b8), acquire&lowbar;capability(0x7f950e1023b8), acquire&lowbar;capability(0x7f9527a51418), acquire&lowbar;capability(0x7f95104b25e8), acquire&lowbar;capability(0x7f950bbe3f88), acquire&lowbar;capability(0x7f9517b76ab8), acquire&lowbar;capability(0x7f951ea72708), acquire&lowbar;capability(0x7f950a202fe8), acquire&lowbar;capability(0x7f9527c3c468), acquire&lowbar;capability(0x7f9513f88ea8), acquire&lowbar;capability(0x7f9523f112c8), acquire&lowbar;capability(0x7f9516a0f6e8), acquire&lowbar;capability(0x7f9503672e28), acquire&lowbar;capability(0x7f9513c3d708), acquire&lowbar;capability(0x7f95262661b8), acquire&lowbar;capability(0x7f9523c2eea8), acquire&lowbar;capability(0x7f951d2a2d48), acquire&lowbar;capability(0x7f952678dd78), acquire&lowbar;capability(0x7f950165f5e8), acquire&lowbar;capability(0x7f95082c7cf8), acquire&lowbar;capability(0x7f9523c2a4a8), acquire&lowbar;capability(0x7f9509278a08), acquire&lowbar;capability(0x7f951c5ad4e8), acquire&lowbar;capability(0x7f950c2ec638), acquire&lowbar;capability(0x7f951250abd8), acquire&lowbar;capability(0x7f95081404b8), acquire&lowbar;capability(0x7f95066ecc68), acquire&lowbar;capability(0x7f9510f52ca8), acquire&lowbar;capability(0x7f9501a156a8), acquire&lowbar;capability(0x7f9508b7ff48), acquire&lowbar;capability(0x7f952165f508), acquire&lowbar;capability(0x7f9517b0e7a8), acquire&lowbar;capability(0x7f9502e53958), acquire&lowbar;capability(0x7f950da85658), acquire&lowbar;capability(0x7f94fc8534c8), acquire&lowbar;capability(0x7f94f8a87ea8), acquire&lowbar;capability(0x7f951fe812a8), acquire&lowbar;capability(0x7f94f066d2b8), acquire&lowbar;capability(0x7f952503c7f8), acquire&lowbar;capability(0x7f950697e418), acquire&lowbar;capability(0x7f9515b87028), acquire&lowbar;capability(0x7f9503850b58), acquire&lowbar;capability(0x7f951494fce8), acquire&lowbar;capability(0x7f95157b9498)&rsqb;&rsqb;
UniqueLock(
    MutexType& mutexIn,
    char const* pszName,
    char const* pszFile,
    int nLine,
    bool fTry = false);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mutexIn*
| Mutex to lock&period;
| *pszName*
| Name of the mutex&period;
| *pszFile*
| Source file of the caller&period;
| *nLine*
| Source line of the caller&period;
| *fTry*
| Whether to attempt a non&hyphen;blocking try&hyphen;lock instead of blocking&period;
|===


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