Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
main_thread.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace helios::ecs {
6
7/// @brief Main-thread executor that runs systems sequentially on the calling
8/// thread.
9class MainThreadExecutor final : public Executor {
10public:
11 void Execute(Schedule& schedule, World& world) override;
12
13 /**
14 * @brief Executes and blocks; for the main thread this is identical to
15 * Execute.
16 */
17 void ExecuteAndWait(Schedule& schedule, World& world) override {
18 Execute(schedule, world);
19 }
20
21 /// @brief No-op: main-thread execution is already synchronous.
22 void Wait() override {}
23};
24
25} // namespace helios::ecs
Abstract interface for schedule executors.
Definition executor.hpp:27
Main-thread executor that runs systems sequentially on the calling thread.
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.
A collection of systems, sets, and run conditions with ordering constraints.
Definition schedule.hpp:182
The World class manages entities with their components and systems.
Definition world.hpp:39