Add a hook to the schedule
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
#23148
#23140
#23145
Dynamically remove systems
Given several requirements regarding schedules, I believe they all point to the same need: to execute commands at certain stages of a schedule (whether before entering or after exiting).
## What solution would you like?
This is beyond my current abilities.
The only thing I can think of is adding new fields to Schedule:
```
pub struct Schedule {
...
enter: Vec RemoveQueue>>,
exit: Vec RemoveQueue>>,
once: Vec RemoveQueue>>,
}
```
The above code is quite rough: functions are executed at the corresponding stages, and they are removed based on the return condition (possibly because the condition wasn't met, or they need to be executed multiple times).
How to obtain the current schedule within a system is a challenge, even if the above functionality is implemented. Adding a command that executes after the current schedule label exits would also introduce complex issues.
Contributor guide
Assessment
This issue has not been assessed yet.