Acquire a lock on the given mutex, registering it for lock‐order checking.

Synopsis

Declared in <sync.h>

UniqueLock(
    MutexType& mutexIn,
    char const* pszName,
    char const* pszFile,
    int nLine,
    bool fTry = false);

Parameters

Name

Description

mutexIn

Mutex to lock.

pszName

Name of the mutex.

pszFile

Source file of the caller.

nLine

Source line of the caller.

fTry

Whether to attempt a non‐blocking try‐lock instead of blocking.

Created with MrDocs