You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/side-effect-lifecycle-scheduling.md
+42-7Lines changed: 42 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,44 @@ We can express this required ordering with labels, before, and after, but they l
25
25
* Readers and writers must be after the producer and before the consumer. They can run in any order in relation to other readers and writers. If there needs to be an order between readers and writers, use the normal before and after labeling.
26
26
* Consumers are run after producers, readers, and writers. There should only be one consumer of a type of side effect.
27
27
28
-
### Some Examples
28
+
### Some Simple Examples
29
29
30
-
> TODO: add example of how api works with run criteria, commands, and maybe something else
@@ -71,16 +106,16 @@ In practice we can't create these system sets like this as it would be very uner
71
106
72
107
## Drawbacks
73
108
74
-
* as this builds on the existing labeling system, there shouldn't be much in terms of performance issues
75
-
76
-
## Alternatives Considered
77
-
78
-
* The example above for expressing the relationships between side effects using just labeling and system sets has one major problem. There is no current api for adding systems to system sets after the system set has been created. If such an api did exist we could potentially just add systems to the correct system set. This didn't seem better than the proposed API and has some implementation complexity since system sets are mostly just api sugar for labeling multiple systems and does not exist at runtime.
109
+
I expect that these relationships will mostly be added automatically when using run criteria, app state, and the like. Users would only be expected to interact with this API when things can't be done automatically or the default behavior doesn't match their needs.
79
110
80
111
## Open questions
81
112
82
113
* With looping criteria it might be possible to create a valid dependency cycle that cannot be resolved in the current API. If that is the case then we might need an `.after_can_break` type of edge that could be ignored in dependency cycle checking.
83
114
115
+
## Alternatives Considered
116
+
117
+
* The example above for expressing the relationships between side effects using just labeling and system sets has one major problem. There is no current api for adding systems to system sets after the system set has been created. If such an api did exist we could potentially just add systems to the correct system set. This didn't seem better than the proposed API and has some implementation complexity since system sets are mostly just api sugar for labeling multiple systems and does not exist at runtime.
118
+
84
119
## Future Work
85
120
86
121
* This is part of a bigger redesign of the ECS trying to solve problems with scheduling around hard sync points and data consistency between states. This RFC by itself doesn't solve those problems, but it does encode information about dependencies that other RFCs might need to actually solve the data consistency problems.
0 commit comments