Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emphasize no structural changes in SystemParam::get_param (#17996)
# Objective Many systems like `Schedule` rely on the fact that every structural ECS changes are deferred until an exclusive system flushes the `World` itself. This gives us the benefits of being able to run systems in parallel without worrying about dangling references caused by memory (re)allocations, which will in turn lead to **Undefined Behavior**. However, this isn't explicitly documented in `SystemParam`; currently it only vaguely hints that in `init_state`, based on the fact that structural ECS changes require mutable access to the _whole_ `World`. ## Solution Document this behavior explicitly in `SystemParam`'s type-level documentations.
- Loading branch information