Acquire a lock on the given mutex pointer, doing nothing if it is null.
Declared in <sync.h>
UniqueLock(
MutexType* pmutexIn,
char const* pszName,
char const* pszFile,
int nLine,
bool fTry = false);
| Name | Description |
|---|---|
| pmutexIn | Mutex to lock, or null to construct an empty 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. |