Navigation
Unreal Engine C++ API Reference > Runtime > Core > HAL
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/HAL/RunnableThread.h |
Include | #include "HAL/RunnableThread.h" |
Syntax
class FRunnableThread
Remarks
Interface for runnable threads.
This interface specifies the methods used to manage a thread's life cycle.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
FRunnable * | Runnable | The runnable object to execute on this thread. |
![]() |
uint64 | ThreadAffinityMask | The Affinity to run the thread with. |
![]() |
uint32 | ThreadID | ID set during thread creation. |
![]() |
FEvent * | ThreadInitSyncEvent | Sync event to make sure that Init() has been completed before allowing the main thread to continue. |
![]() |
FString | ThreadName | Holds the name of the thread. |
![]() |
EThreadPriority | ThreadPriority | The priority to run the thread at. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Default constructor. |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Virtual destructor |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FRunnableThread * | Create
(
FRunnable* InRunnable, |
Factory method to create a thread with the specified stack size and thread priority. |
![]() |
bool | CreateInternal
(
FRunnable* InRunnable, |
Creates the thread with the specified stack size and thread priority. |
![]() |
void | FreeTls () |
Deletes all FTlsAutoCleanup objects created for this thread. |
![]() ![]() |
FRunnableThread * | ||
![]() ![]() |
const uint32 | GetThreadID () |
Thread ID for this thread |
![]() ![]() |
const FString & | Retrieves the given name of the thread | |
![]() ![]() |
EThreadPriority | Returns the runnable's thread priority | |
![]() ![]() ![]() |
FRunnableThread::ThreadType | Returns the type of thread this is | |
![]() ![]() |
uint32 | GetTlsSlot () |
Gets a new Tls slot for storing the runnable thread pointer. |
![]() |
bool | Kill
(
bool bShouldWait |
Tells the thread to exit. |
![]() ![]() |
bool | SetThreadAffinity
(
const FThreadAffinity& Affinity |
Changes the thread affinity of the currently running thread |
![]() |
void | SetThreadPriority
(
EThreadPriority NewPriority |
Changes the thread priority of the currently running thread |
![]() |
void | SetTls () |
Stores this instance in the runnable thread TLS slot. |
![]() |
void | Suspend
(
bool bShouldPause |
Tells the thread to either pause execution or resume depending on the passed in value. |
![]() |
void | Halts the caller until this thread is has completed its work. |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
ThreadType | List of unique thread types we can create |
Constants
Name | Description |
---|---|
RunnableTlsSlot | Index of TLS slot for FRunnableThread pointer. |