Expand description
Configuration of execution: determines which threads shall be started Defines a lightweight snapshot of which application threads are configured to run.
This module provides the ExecutionConfig struct, which is created once at application
startup. Its sole purpose is to hold a simple boolean flag for each major,
concurrently running module (like feed, refill, heating, etc.), indicating
whether it was intended to be executed.
§Design and Purpose
The primary role of ExecutionConfig is to act as a decoupled, easily passable
source of truth about the runtime configuration.
-
Decoupling: Instead of passing the entire, heavy
ConfigDataobject throughout the application, threads can be given this much simpler struct. This is particularly useful for cross-cutting concerns like the IPCmessagingdispatcher, which needs to know if a target thread exists without needing to know its specific configuration details. -
Simplicity: It provides a direct and unambiguous way to check if a thread was launched. The
new()constructor handles the one-time translation from the more complexConfigDatastruct. -
Testability: The
Defaultimplementation provides a convenient way to create anExecutionConfigwhere all modules are considered active, which is useful for setting up test environments.
Structs§
- Execution
Config - A snapshot of which application threads are configured to be active at runtime.