Navigation
API > API/Runtime > API/Runtime/Core
A mutex ownership wrapper that allows dynamic locking, unlocking, and deferred locking.
LockType must contain Lock() and Unlock() functions.
Use with mutex types like FMutex and FRecursiveMutex.
| Name | TDynamicUniqueLock |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Async/UniqueLock.h |
| Include Path | #include "Async/UniqueLock.h" |
Syntax
template<typename LockType>
class TDynamicUniqueLock
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Async/UniqueLock.h | |||
TDynamicUniqueLock
(
const TDynamicUniqueLock& |
Async/UniqueLock.h | ||
TDynamicUniqueLock
(
LockType& Lock |
Wrap a mutex and lock it. | Async/UniqueLock.h | |
TDynamicUniqueLock
(
TDynamicUniqueLock&& Other |
Move from another lock, transferring any ownership to this lock. | Async/UniqueLock.h | |
TDynamicUniqueLock
(
LockType& Lock, |
Wrap a mutex without locking it. | Async/UniqueLock.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TDynamicUniqueLock() |
Unlock the mutex if locked. | Async/UniqueLock.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLocked | bool | Async/UniqueLock.h | ||
| Mutex | LockType * | Async/UniqueLock.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Lock() |
Lock the associated mutex. This lock must have a mutex and must not be locked. | Async/UniqueLock.h | |
bool OwnsLock() |
Returns true if this lock has its associated mutex locked. | Async/UniqueLock.h | |
void Unlock() |
Unlock the associated mutex. This lock must have a mutex and must be locked. | Async/UniqueLock.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Returns true if this lock has its associated mutex locked. | Async/UniqueLock.h | |
TDynamicUniqueLock & operator=
(
const TDynamicUniqueLock& |
Async/UniqueLock.h | ||
TDynamicUniqueLock & operator=
(
TDynamicUniqueLock&& Other |
Move from another lock, transferring any ownership to this lock, and unlocking the previous mutex if locked. | Async/UniqueLock.h |