UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FGCCSyncObject Class Reference

#include <GCScopeLock.h>

Public Member Functions

 FGCCSyncObject ()
 
 ~FGCCSyncObject ()
 
void LockAsync ()
 
bool TryLockAsync (bool bShouldLock=!IsInGameThread())
 
void UnlockAsync (bool bShouldUnlock=!IsInGameThread())
 
void GCLock ()
 
bool IsAsyncLocked () const
 
bool IsGCLocked () const
 
bool TryGCLock ()
 
void GCUnlock ()
 
void SetGCIsWaiting ()
 
void ResetGCIsWaiting ()
 
FORCEINLINE bool IsGCWaiting () const
 

Static Public Member Functions

static void Create ()
 
static FGCCSyncObjectGet ()
 

Detailed Description

Garbage Collection synchronization objects Will not lock other threads if GC is not running. Has the ability to only lock for GC if no other locks are present.

Constructor & Destructor Documentation

◆ FGCCSyncObject()

FGCCSyncObject::FGCCSyncObject ( )

◆ ~FGCCSyncObject()

FGCCSyncObject::~FGCCSyncObject ( )

Member Function Documentation

◆ Create()

void FGCCSyncObject::Create ( )
static

Creates the singleton object

◆ GCLock()

void FGCCSyncObject::GCLock ( )
inline

Lock for GC. Will block if any other thread has locked.

◆ GCUnlock()

void FGCCSyncObject::GCUnlock ( )
inline

Unlock GC

◆ Get()

FGCCSyncObject & FGCCSyncObject::Get ( )
static

Gets the singleton object

◆ IsAsyncLocked()

bool FGCCSyncObject::IsAsyncLocked ( ) const
inline

Checks if any async thread has a lock

◆ IsGCLocked()

bool FGCCSyncObject::IsGCLocked ( ) const
inline

Checks if GC has a lock

◆ IsGCWaiting()

FORCEINLINE bool FGCCSyncObject::IsGCWaiting ( ) const
inline

True if GC wants to run on the game thread but is maybe blocked by some other thread

◆ LockAsync()

void FGCCSyncObject::LockAsync ( )
inline

Lock on non-game thread. Will block if GC is running.

◆ ResetGCIsWaiting()

void FGCCSyncObject::ResetGCIsWaiting ( )
inline

Manually reset GC 'waiting to run' state

◆ SetGCIsWaiting()

void FGCCSyncObject::SetGCIsWaiting ( )
inline

Manually mark GC state as 'waiting to run'

◆ TryGCLock()

bool FGCCSyncObject::TryGCLock ( )
inline

Lock for GC. Will not block and return false if any other thread has already locked.

◆ TryLockAsync()

bool FGCCSyncObject::TryLockAsync ( bool  bShouldLock = !IsInGameThread())
inline

Attempt async Lock

◆ UnlockAsync()

void FGCCSyncObject::UnlockAsync ( bool  bShouldUnlock = !IsInGameThread())
inline

Release lock from non-game thread


The documentation for this class was generated from the following files: