#include <EngineControlState.h>
◆ ControlRoutine
◆ GameRoutine
◆ controlRoutineQueue
Queue of control routines to run, these are added from the main thread and are consumed & run in control thread. Routines are removed from the queue only once they're finished.
◆ currentSide
Which thread is currently active.
◆ gameRoutine
A way to run some code in the main thread w/o really leaving the control routine. If this function is valid, yielding execution from the control thread will run it w/o proceeding to the next frame, and then switch right back into the control thread. It is set in control thread and cleared in the main thread.
Exception propagation from the control thread to the main thread is done with a game routine.
◆ mutex
std::mutex EngineControlState::mutex |
This mutex protects everything. Game thread & control thread can run ONLY after locking it, and thus cannot run in parallel.
◆ postedEvents
std::queue<std::unique_ptr<PlatformEvent> > EngineControlState::postedEvents |
Posted events, these are added from the control thread and are then consumed in the main thread.
◆ terminating
bool EngineControlState::terminating = false |
Flag denoting that EngineControlComponent
is being destroyed and it's time to terminate the control thread. It is set from the main thread.
◆ wakeEvents
Condvars to wake up control/game threads.
The documentation for this class was generated from the following file: