CORE Game Developers Toolkit v1.0.0
 
Loading...
Searching...
No Matches
CORE.Shared.Dispatcher Class Reference
+ Inheritance diagram for CORE.Shared.Dispatcher:

Static Public Member Functions

static void Enqueue (Action action, bool delayCall=true)
 Enqueue an action on the main Thread.
 
static new Coroutine StartCoroutine (IEnumerator routine)
 
static new void StopCoroutine (Coroutine routine)
 

Protected Member Functions

override void Awake ()
 

Private Member Functions

void Update ()
 
void OnDestroy ()
 
void ProcessQueue ()
 

Static Private Attributes

static readonly Queue< Action > _executionQueue = new Queue<Action>()
 
static Thread MainThread
 

Additional Inherited Members

- Protected Attributes inherited from CORE.Shared.Utils.SingletonMonoBehaviour< T >
bool _didAwake
 
- Properties inherited from CORE.Shared.Utils.SingletonMonoBehaviour< T >
static T Instance [get, private set]
 

Member Function Documentation

◆ Awake()

override void CORE.Shared.Dispatcher.Awake ( )
protectedvirtual

◆ Enqueue()

static void CORE.Shared.Dispatcher.Enqueue ( Action action,
bool delayCall = true )
static

Enqueue an action on the main Thread.

Parameters
actionThe action.
delayCallIf we already are on the main thread, enqueue and delay the call anyways.

◆ OnDestroy()

void CORE.Shared.Dispatcher.OnDestroy ( )
private

◆ ProcessQueue()

void CORE.Shared.Dispatcher.ProcessQueue ( )
private

◆ StartCoroutine()

static new Coroutine CORE.Shared.Dispatcher.StartCoroutine ( IEnumerator routine)
static

◆ StopCoroutine()

static new void CORE.Shared.Dispatcher.StopCoroutine ( Coroutine routine)
static

◆ Update()

void CORE.Shared.Dispatcher.Update ( )
private

Member Data Documentation

◆ _executionQueue

readonly Queue<Action> CORE.Shared.Dispatcher._executionQueue = new Queue<Action>()
staticprivate

◆ MainThread

Thread CORE.Shared.Dispatcher.MainThread
staticprivate

The documentation for this class was generated from the following file: