Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Async
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Async/UniqueLock.h |
| Include | #include "Async/UniqueLock.h" |
Syntax
template<typename LockType>
class TDynamicUniqueLock
Remarks
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.
Constructors
| Type | Name | Description | |
|---|---|---|---|
TDynamicUniqueLock
(
const TDynamicUniqueLock& |
|||
TDynamicUniqueLock
(
LockType& Lock |
Wrap a mutex and lock it. | ||
TDynamicUniqueLock
(
TDynamicUniqueLock&& Other |
Move from another lock, transferring any ownership to this lock. | ||
TDynamicUniqueLock
(
LockType& Lock, |
Wrap a mutex without locking it. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| Unlock the mutex if locked. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Lock () |
Lock the associated mutex. This lock must have a mutex and must not be locked. | |
| bool | OwnsLock () |
Returns true if this lock has its associated mutex locked. | |
| void | Unlock () |
Unlock the associated mutex. This lock must have a mutex and must be locked. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Returns true if this lock has its associated mutex locked. | |||
| TDynamicUniqueLock & | operator=
(
const TDynamicUniqueLock& |
||
| TDynamicUniqueLock & | operator=
(
TDynamicUniqueLock&& Other |
Move from another lock, transferring any ownership to this lock, and unlocking the previous mutex if locked. |