Navigation
Unreal Engine C++ API Reference > Runtime > Core > HAL
Inheritance Hierarchy
- FTlsAutoCleanup
- TThreadSingleton
- FBlueprintContextTracker
- FBuildRawPoseScratchArea
- FDeferredCdoInitializationTracker
- FDeferredSubObjInitializationTracker
- FMemStack
- FScriptExceptionHandler
- FSoftObjectPathThreadContext
- FThreadIdleStats
- FUObjectThreadContext
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/HAL/ThreadSingleton.h |
Include | #include "HAL/ThreadSingleton.h" |
Syntax
template<class T>
class TThreadSingleton : public FTlsAutoCleanup
Remarks
This a special version of singleton. It means that there is created only one instance for each thread. Calling Get() method is thread-safe.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
const uint32 | ThreadId | Thread ID of this thread singleton. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Default constructor. |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FTlsAutoCleanup * | ||
![]() ![]() |
T & | Get () |
|
![]() ![]() |
T & | Get
(
TFunctionRef< FTlsAutoCleanup*()> CreateInstance |
|
![]() ![]() |
T * | Inject
(
T* Instance |
|
![]() ![]() |
T * | TryGet () |