UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FNamedTaskThread Class Reference
+ Inheritance diagram for FNamedTaskThread:

Public Member Functions

virtual void ProcessTasksUntilQuit (int32 QueueIndex) override
 
virtual uint64 ProcessTasksUntilIdle (int32 QueueIndex) override
 
uint64 ProcessTasksNamedThread (int32 QueueIndex, bool bAllowStall)
 
virtual void EnqueueFromThisThread (int32 QueueIndex, FBaseGraphTask *Task) override
 
virtual void RequestQuit (int32 QueueIndex) override
 
virtual bool EnqueueFromOtherThread (int32 QueueIndex, FBaseGraphTask *Task) override
 
virtual bool IsProcessingTasks (int32 QueueIndex) override
 
virtual void WakeUp (int32 QueueIndex) override
 
- Public Member Functions inherited from FTaskThreadBase
 FTaskThreadBase ()
 
void Setup (ENamedThreads::Type InThreadId, uint32 InPerThreadIDTLSSlot, FWorkerThread *InOwnerWorker)
 
void InitializeForCurrentThread ()
 
ENamedThreads::Type GetThreadId () const
 
virtual void Tick () override
 
virtual bool Init () override
 
virtual uint32 Run () override
 
virtual void Stop () override
 
virtual void Exit () override
 
virtual FSingleThreadRunnableGetSingleThreadInterface () override
 
- Public Member Functions inherited from FRunnable
virtual ~FRunnable ()
 

Additional Inherited Members

- Protected Attributes inherited from FTaskThreadBase
ENamedThreads::Type ThreadId
 
uint32 PerThreadIDTLSSlot
 
FThreadSafeCounter IsStalled
 
TArray< FBaseGraphTask * > NewTasks
 
FWorkerThreadOwnerWorker
 

Detailed Description

FNamedTaskThread A class for managing a named thread.

Member Function Documentation

◆ EnqueueFromOtherThread()

virtual bool FNamedTaskThread::EnqueueFromOtherThread ( int32  QueueIndex,
FBaseGraphTask Task 
)
inlineoverridevirtual

Queue a task, assuming that this thread is not the same as the current thread.

Parameters
QueueIndex,Queueto enqueue into
Task;Task to queue.

Reimplemented from FTaskThreadBase.

◆ EnqueueFromThisThread()

virtual void FNamedTaskThread::EnqueueFromThisThread ( int32  QueueIndex,
FBaseGraphTask Task 
)
inlineoverridevirtual

Queue a task, assuming that this thread is the same as the current thread. For named threads, these go directly into the private queue.

Parameters
QueueIndex,Queueto enqueue for
TaskTask to queue.

Reimplemented from FTaskThreadBase.

◆ IsProcessingTasks()

virtual bool FNamedTaskThread::IsProcessingTasks ( int32  QueueIndex)
inlineoverridevirtual

Return true if this thread is processing tasks. This is only a "guess" if you ask for a thread other than yourself because that can change before the function returns.

Parameters
QueueIndex,Queueto request quit from

Implements FTaskThreadBase.

◆ ProcessTasksNamedThread()

uint64 FNamedTaskThread::ProcessTasksNamedThread ( int32  QueueIndex,
bool  bAllowStall 
)
inline

◆ ProcessTasksUntilIdle()

virtual uint64 FNamedTaskThread::ProcessTasksUntilIdle ( int32  QueueIndex)
inlineoverridevirtual

Used for named threads to start processing tasks until the thread is idle and RequestQuit has been called.

Reimplemented from FTaskThreadBase.

◆ ProcessTasksUntilQuit()

virtual void FNamedTaskThread::ProcessTasksUntilQuit ( int32  QueueIndex)
inlineoverridevirtual

Used for named threads to start processing tasks until the thread is idle and RequestQuit has been called.

Implements FTaskThreadBase.

◆ RequestQuit()

virtual void FNamedTaskThread::RequestQuit ( int32  QueueIndex)
inlineoverridevirtual

Will cause the thread to return to the caller when it becomes idle. Used to return from ProcessTasksUntilQuit for named threads or to shut down unnamed threads. CAUTION: This will not work under arbitrary circumstances. For example you should not attempt to stop unnamed threads unless they are known to be idle. Return requests for named threads should be submitted from that named thread as FReturnGraphTask does.

Parameters
QueueIndex,Queueto request quit from

Implements FTaskThreadBase.

◆ WakeUp()

virtual void FNamedTaskThread::WakeUp ( int32  QueueIndex)
inlineoverridevirtual

Implements FTaskThreadBase.


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