TThreadSingleton

This a special version of singleton.

Windows
MacOS
Linux

Inheritance Hierarchy

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

Name Description

Protected variable

const uint32

 

ThreadId

Thread ID of this thread singleton.

Constructors

Name Description

Protected function

TThreadSingleton()

Default constructor.

Functions

Name Description

Protected function Static

FTlsAutoClea...

 

CreateInstance()

Public function Static

T &

 

Get()

Public function Static

T &

 

Get

(
    TFunctionRef< FTlsAutoCleanup*...
)

Public function Static

T *

 

TryGet()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss