UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Threading.h File Reference

Go to the source code of this file.

Classes

class  Chaos::FPhysicsThreadContext
 
struct  Chaos::FPhysicsThreadContextScope
 
struct  Chaos::FGameThreadContextScope
 
struct  Chaos::FFrozenGameThreadContextScope
 
class  Chaos::FPhysicsSceneGuard
 
class  Chaos::TMutexScopeLock< MutexType >
 
class  Chaos::TRwFifoLock< MutexType >
 
class  Chaos::FPhysSpinLock
 
class  Chaos::FPhysicsRwLock
 
class  Chaos::FPhysicsSimpleMutexLock
 
class  Chaos::TPhysicsSceneGuardScopedWrite< MutexType >
 
class  Chaos::TPhysicsSceneGuardScopedRead< MutexType >
 

Namespaces

namespace  Chaos
 
namespace  Chaos::ThreadingPrivate
 

Macros

#define PHYSICS_THREAD_CONTEXT   1
 
#define CHAOS_SCENE_LOCK_SCENE_GUARD   0
 
#define CHAOS_SCENE_LOCK_RWFIFO_SPINLOCK   1
 
#define CHAOS_SCENE_LOCK_RWFIFO_CRITICALSECTION   2
 
#define CHAOS_SCENE_LOCK_FRWLOCK   3
 
#define CHAOS_SCENE_LOCK_SIMPLE_MUTEX   4
 
#define CHAOS_SCENE_LOCK_TYPE   CHAOS_SCENE_LOCK_FRWLOCK
 
#define CHAOS_SCENE_LOCK_CHECKS   0
 
#define CHAOS_CHECK_READ_ASSUMPTION
 
#define CHAOS_CHECK_WRITE_ASSUMPTION
 
#define CHAOS_CHECK_READ_ASSUMPTION_ACTOR
 
#define CHAOS_CHECK_WRITE_ASSUMPTION_ACTOR
 
#define CHAOS_CHECK_READ_ASSUMPTION_CONSTRAINT
 
#define CHAOS_CHECK_WRITE_ASSUMPTION_CONSTRAINT
 
#define CHAOS_RECORD_ENTER_READ_LOCK   Chaos::ThreadingPrivate::IncReadDepth(this);
 
#define CHAOS_RECORD_ENTER_WRITE_LOCK   Chaos::ThreadingPrivate::IncWriteDepth(this);
 
#define CHAOS_RECORD_LEAVE_READ_LOCK   Chaos::ThreadingPrivate::DecReadDepth(this);
 
#define CHAOS_RECORD_LEAVE_WRITE_LOCK   Chaos::ThreadingPrivate::DecWriteDepth(this);
 

Typedefs

using Chaos::EThreadingMode = EChaosThreadingMode
 
using Chaos::FPhysSceneLockNonTransactional = FPhysicsRwLock
 
using Chaos::FPhysSceneLock = FPhysSceneLockNonTransactional
 
using Chaos::FPhysicsSceneGuardScopedWrite = TPhysicsSceneGuardScopedWrite< FPhysSceneLock >
 
using Chaos::FPhysicsSceneGuardScopedRead = TPhysicsSceneGuardScopedRead< FPhysSceneLock >
 

Functions

FORCEINLINE bool Chaos::IsInPhysicsThreadContext ()
 
FORCEINLINE bool Chaos::IsInGameThreadContext ()
 
FORCEINLINE void Chaos::EnsureIsInPhysicsThreadContext ()
 
FORCEINLINE void Chaos::EnsureIsInGameThreadContext ()
 

Macro Definition Documentation

◆ CHAOS_CHECK_READ_ASSUMPTION

#define CHAOS_CHECK_READ_ASSUMPTION

◆ CHAOS_CHECK_READ_ASSUMPTION_ACTOR

#define CHAOS_CHECK_READ_ASSUMPTION_ACTOR

◆ CHAOS_CHECK_READ_ASSUMPTION_CONSTRAINT

#define CHAOS_CHECK_READ_ASSUMPTION_CONSTRAINT

◆ CHAOS_CHECK_WRITE_ASSUMPTION

#define CHAOS_CHECK_WRITE_ASSUMPTION

◆ CHAOS_CHECK_WRITE_ASSUMPTION_ACTOR

#define CHAOS_CHECK_WRITE_ASSUMPTION_ACTOR

◆ CHAOS_CHECK_WRITE_ASSUMPTION_CONSTRAINT

#define CHAOS_CHECK_WRITE_ASSUMPTION_CONSTRAINT

◆ CHAOS_RECORD_ENTER_READ_LOCK

#define CHAOS_RECORD_ENTER_READ_LOCK   Chaos::ThreadingPrivate::IncReadDepth(this);

Signals that we have entered a read lock to control the checks above

◆ CHAOS_RECORD_ENTER_WRITE_LOCK

#define CHAOS_RECORD_ENTER_WRITE_LOCK   Chaos::ThreadingPrivate::IncWriteDepth(this);

Signals that we have entered a write lock to control the checks above

◆ CHAOS_RECORD_LEAVE_READ_LOCK

#define CHAOS_RECORD_LEAVE_READ_LOCK   Chaos::ThreadingPrivate::DecReadDepth(this);

Signals that we have left a read lock to control the checks above

◆ CHAOS_RECORD_LEAVE_WRITE_LOCK

#define CHAOS_RECORD_LEAVE_WRITE_LOCK   Chaos::ThreadingPrivate::DecWriteDepth(this);

Signals that we have left a write lock to control the checks above

◆ CHAOS_SCENE_LOCK_CHECKS

#define CHAOS_SCENE_LOCK_CHECKS   0

Controls whether the runtime will check and emit errors when a read or write operation is attempted but an appropriate read or write lock has not been taken by the caller NOTE: Disable currently until this can be made to check with the per-instance thread counts.

◆ CHAOS_SCENE_LOCK_FRWLOCK

#define CHAOS_SCENE_LOCK_FRWLOCK   3

◆ CHAOS_SCENE_LOCK_RWFIFO_CRITICALSECTION

#define CHAOS_SCENE_LOCK_RWFIFO_CRITICALSECTION   2

◆ CHAOS_SCENE_LOCK_RWFIFO_SPINLOCK

#define CHAOS_SCENE_LOCK_RWFIFO_SPINLOCK   1

◆ CHAOS_SCENE_LOCK_SCENE_GUARD

#define CHAOS_SCENE_LOCK_SCENE_GUARD   0

Scene lock types

See also
CHAOS_SCENE_LOCK_TYPE

◆ CHAOS_SCENE_LOCK_SIMPLE_MUTEX

#define CHAOS_SCENE_LOCK_SIMPLE_MUTEX   4

◆ CHAOS_SCENE_LOCK_TYPE

#define CHAOS_SCENE_LOCK_TYPE   CHAOS_SCENE_LOCK_FRWLOCK

Controls the scene lock type. See above.

◆ PHYSICS_THREAD_CONTEXT

#define PHYSICS_THREAD_CONTEXT   1