Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::ecs::MainThreadExecutor Class Referencefinal

Main-thread executor that runs systems sequentially on the calling thread. More...

#include <main_thread.hpp>

Inheritance diagram for helios::ecs::MainThreadExecutor:
helios::ecs::Executor

Public Member Functions

void Execute (Schedule &schedule, World &world) override
 Submits all systems in the schedule for execution.
void ExecuteAndWait (Schedule &schedule, World &world) override
 Executes and blocks; for the main thread this is identical to Execute.
void Wait () override
 No-op: main-thread execution is already synchronous.
Public Member Functions inherited from helios::ecs::Executor
virtual ~Executor ()=default

Detailed Description

Main-thread executor that runs systems sequentially on the calling thread.

Definition at line 9 of file main_thread.hpp.

Member Function Documentation

◆ Execute()

void helios::ecs::MainThreadExecutor::Execute ( Schedule & schedule,
World & world )
overridevirtual

Submits all systems in the schedule for execution.

May return before execution completes. Call Wait() to block until completion.

Parameters
scheduleCompiled schedule to execute
worldWorld to pass to each system

Implements helios::ecs::Executor.

Definition at line 14 of file main_thread.cpp.

◆ ExecuteAndWait()

void helios::ecs::MainThreadExecutor::ExecuteAndWait ( Schedule & schedule,
World & world )
inlineoverridevirtual

Executes and blocks; for the main thread this is identical to Execute.

Reimplemented from helios::ecs::Executor.

Definition at line 17 of file main_thread.hpp.

◆ Wait()

void helios::ecs::MainThreadExecutor::Wait ( )
inlineoverridevirtual

No-op: main-thread execution is already synchronous.

Reimplemented from helios::ecs::Executor.

Definition at line 22 of file main_thread.hpp.