Navigation
API > API/Runtime > API/Runtime/Core
Manages runnables and runnable threads.
| Name | FThreadManager |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/HAL/ThreadManager.h |
| Include Path | #include "HAL/ThreadManager.h" |
Syntax
class FThreadManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FThreadManager() |
HAL/ThreadManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FThreadManager() |
HAL/ThreadManager.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FThreads | TMap< uint32, FRunnableThread *, TInlineSetAllocator< 256 > > | HAL/ThreadManager.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsThreadListDirty | bool | Helper variable for catching unexpected modification of the thread map/list. | HAL/ThreadManager.h | |
| Threads | FThreads | List of thread objects to be ticked. | HAL/ThreadManager.h | |
| ThreadsCritical | FCriticalSection | Critical section for ThreadList | HAL/ThreadManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddThread
(
uint32 ThreadId, |
Used internally to add a new thread object. | HAL/ThreadManager.h | |
void ForEachThread
(
TFunction< void(uint32 ThreadId, FRunnableThread*Thread)> Func |
Enumerate each thread. | HAL/ThreadManager.h | |
int32 NumThreads() |
Get the number of registered threads | HAL/ThreadManager.h | |
void RemoveThread
(
FRunnableThread* Thread |
Used internally to remove thread object. | HAL/ThreadManager.h | |
void Tick() |
Ticks all fake threads and their runnable objects. | HAL/ThreadManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FThreadManager & Get() |
Access to the singleton object. | HAL/ThreadManager.h | |
static const FString & GetThreadName
(
uint32 ThreadId |
Returns the name of a thread given its TLS id | HAL/ThreadManager.h |