UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ThreadSingleton.h File Reference
#include "CoreTypes.h"
#include "Templates/Function.h"
#include "HAL/PlatformTLS.h"
#include "HAL/TlsAutoCleanup.h"

Go to the source code of this file.

Classes

class  FThreadSingletonInitializer
 
class  TThreadSingleton< T >
 

Macros

#define UE_DECLARE_THREAD_SINGLETON_TLS(Type, Api)   template<> Api uint32& TThreadSingleton<Type>::GetTlsSlot();
 
#define UE_DEFINE_THREAD_SINGLETON_TLS(Type, Api)   template<> Api uint32& TThreadSingleton<Type>::GetTlsSlot() { static uint32 TlsSlot = FPlatformTLS::InvalidTlsSlot; return TlsSlot; }
 

Macro Definition Documentation

◆ UE_DECLARE_THREAD_SINGLETON_TLS

#define UE_DECLARE_THREAD_SINGLETON_TLS (   Type,
  Api 
)    template<> Api uint32& TThreadSingleton<Type>::GetTlsSlot();

◆ UE_DEFINE_THREAD_SINGLETON_TLS

#define UE_DEFINE_THREAD_SINGLETON_TLS (   Type,
  Api 
)    template<> Api uint32& TThreadSingleton<Type>::GetTlsSlot() { static uint32 TlsSlot = FPlatformTLS::InvalidTlsSlot; return TlsSlot; }