Ark Server API (ASA) - Wiki
|
#include <ThreadSingleton.h>
Static Public Member Functions | |
static FORCEINLINE T & | Get () |
static FORCEINLINE T & | Get (TFunctionRef< FTlsAutoCleanup *()> CreateInstance) |
static FORCEINLINE T * | TryGet () |
static FORCEINLINE T * | Inject (T *Instance) |
Protected Member Functions | |
TThreadSingleton () | |
virtual | ~TThreadSingleton () |
Static Protected Member Functions | |
static FTlsAutoCleanup * | CreateInstance () |
Protected Attributes | |
const uint32 | ThreadId |
Static Private Member Functions | |
static uint32 & | GetTlsSlot () |
Additional Inherited Members | |
Public Member Functions inherited from FTlsAutoCleanup | |
virtual | ~FTlsAutoCleanup () |
void | Register () |
This a special version of singleton. It means that there is created only one instance for each thread. Calling Get() method is thread-safe.
Definition at line 41 of file ThreadSingleton.h.
|
inlineprotected |
Default constructor.
Definition at line 69 of file ThreadSingleton.h.
|
inlineprotectedvirtual |
Definition at line 73 of file ThreadSingleton.h.
|
inlinestaticprotected |
Definition at line 86 of file ThreadSingleton.h.
|
inlinestatic |
Definition at line 99 of file ThreadSingleton.h.
|
inlinestatic |
CreateInstance | Function to call when a new instance must be created. |
Definition at line 108 of file ThreadSingleton.h.
Definition at line 59 of file ThreadSingleton.h.
|
inlinestatic |
Definition at line 124 of file ThreadSingleton.h.
|
inlinestatic |
Definition at line 116 of file ThreadSingleton.h.
Thread ID of this thread singleton.
Definition at line 92 of file ThreadSingleton.h.