Strategies API
These are the built-in execution strategies.
- ml.strategies.execute(part: Part, creator_thread_name: str, parent_log_entry: dict | None, tick: int | None = None)[source]
A wrapper to log the start and end of a part’s execution within a dedicated thread spawned by a parallel execution strategy.
This also sets the thread-local decimal precision.
- ml.strategies.sequential_execution(parent_part: Part, scheduled_parts: Set[Part], strategy_event: dict)[source]
A simple execution strategy that executes scheduled parts sequentially.
It iterates through the provided set of parts and calls the execute() method on each one. The order of execution is not guaranteed due to the nature of sets.
- Parameters:
parent_part – The structural part that is invoking this strategy.
scheduled_parts – A set of parts that have been scheduled for execution.
strategy_event – The log entry for the strategy’s start event (unused).