Navigation
API > API/Plugins > API/Plugins/PCG
Similar to existing UE::TScopeLock but allows optional TryLock in which case caller is responsible to check if Lock succeeded or not with IsLocked(). This allows execution code to be skipped if non main thread tasks fail to get the lock instead of waiting. Also add an option to have an optional lock, if we have a code path that support both lock and lockless.
| Name | TScopeLock |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/PCGCommon.h |
| Include Path | #include "PCGCommon.h" |
Syntax
template<typename LockType>
class TScopeLock
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScopeLock
(
TScopeLock&& |
PCGCommon.h | ||
TScopeLock
(
const TScopeLock& |
PCGCommon.h | ||
TScopeLock
(
LockType* InLock, |
PCGCommon.h | ||
TScopeLock
(
LockType& InLock, |
PCGCommon.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TScopeLock() |
PCGCommon.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLocked | bool | PCGCommon.h | ||
| bShouldLock | bool | PCGCommon.h | ||
| Lock | LockType * | PCGCommon.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsLocked() |
PCGCommon.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScopeLock & operator=
(
const TScopeLock& |
PCGCommon.h | ||
TScopeLock & operator=
(
TScopeLock&& |
PCGCommon.h |