[#UniqueLock] = UniqueLock :mrdocs: Wrapper around std::unique_lock style lock for MutexType. == Synopsis Declared in `<sync.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename MutexType> class [[scoped_lockable]] UniqueLock : public MutexType::unique_lock ---- == Base Classes [cols="1,4"] |=== | Name| Description | `MutexType::unique_lock` | |=== == Types [cols="1,4"] |=== | Name| Description | xref:UniqueLock/reverse_lock.adoc[`reverse_lock`] | An RAII‐style reverse lock. Unlocks on construction and locks on destruction. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:UniqueLock/2constructor-05.adoc[`UniqueLock`] [.small]#[constructor]# | Acquire a lock on the given mutex, registering it for lock‐order checking. | xref:UniqueLock/2constructor-0c.adoc[`UniqueLock`] [.small]#[constructor]# | Acquire a lock on the given mutex pointer, doing nothing if it is null. | xref:UniqueLock/2destructor.adoc[`~UniqueLock`] [.small]#[destructor]# | Release the lock if held and update lock‐order bookkeeping. | xref:UniqueLock/2conversion.adoc[`operator bool`] | Report whether this lock currently owns its mutex. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:UniqueLock/2constructor-07.adoc[`UniqueLock`] [.small]#[constructor]# | Construct an empty lock that owns no mutex (needed for reverse_lock). |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:UniqueLock/reverse_lock.adoc[UniqueLock::reverse_lock]` | An RAII‐style reverse lock. Unlocks on construction and locks on destruction. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#