Ark Server API (ASA) - Wiki
|
#include <ThreadManager.h>
Public Member Functions | |
void | AddThread (uint32 ThreadId, FRunnableThread *Thread) |
void | RemoveThread (FRunnableThread *Thread) |
int32 | NumThreads () const |
void | Tick () |
void | ForEachThread (TFunction< void(uint32 ThreadId, FRunnableThread *Thread)> Func) |
Static Public Member Functions | |
static const FString & | GetThreadName (uint32 ThreadId) |
static FThreadManager & | Get () |
Private Types | |
using | FThreads = TMap<uint32, FRunnableThread*, TInlineSetAllocator<256>> |
Private Member Functions | |
TArray< FRunnableThread * > | GetForkableThreads () |
const FString & | GetThreadNameInternal (uint32 ThreadId) |
Private Attributes | |
FCriticalSection | ThreadsCritical |
FThreads | Threads |
Friends | |
class | FForkProcessHelper |
Manages runnables and runnable threads.
Definition at line 19 of file ThreadManager.h.
|
private |
Definition at line 24 of file ThreadManager.h.
void FThreadManager::AddThread | ( | uint32 | ThreadId, |
FRunnableThread * | Thread ) |
void FThreadManager::ForEachThread | ( | TFunction< void(uint32 ThreadId, FRunnableThread *Thread)> | Func | ) |
Enumerate each thread.
|
static |
Access to the singleton object.
|
private |
Returns a list of registered forkable threads
Returns the name of a thread given its TLS id
Definition at line 53 of file ThreadManager.h.
Returns internal name of a the thread given its TLS id
|
inline |
Get the number of registered threads
Definition at line 47 of file ThreadManager.h.
void FThreadManager::RemoveThread | ( | FRunnableThread * | Thread | ) |
Used internally to remove thread object.
Thread | thread object to be removed. |
void FThreadManager::Tick | ( | ) |
Ticks all fake threads and their runnable objects.
|
friend |
Definition at line 96 of file ThreadManager.h.
|
private |
List of thread objects to be ticked.
Definition at line 26 of file ThreadManager.h.
|
private |
Critical section for ThreadList
Definition at line 22 of file ThreadManager.h.