Commit 17fee27
authored
fix: Fix race in scheduler (#25)
This fixes a data race in the scheduler that caused some child resources to be missed.
The implementation is now correct, but it could be made more efficient. The point is that we have to submit the sentinel indicating the start of the resolver before submitting the job, otherwise the job might send a "finished" signal before the "start" signal is sent, causing the counts to be equal before all resources have actually been processed.1 parent a53bb0e commit 17fee27
1 file changed
+11
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 25 | + | |
| 26 | + | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
| |||
89 | 85 | | |
90 | 86 | | |
91 | 87 | | |
92 | | - | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
| |||
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
| 113 | + | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
| |||
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
126 | | - | |
127 | 122 | | |
128 | 123 | | |
129 | 124 | | |
| |||
145 | 140 | | |
146 | 141 | | |
147 | 142 | | |
148 | | - | |
149 | 143 | | |
150 | 144 | | |
151 | 145 | | |
| |||
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
169 | 159 | | |
170 | 160 | | |
171 | 161 | | |
| |||
180 | 170 | | |
181 | 171 | | |
182 | 172 | | |
183 | | - | |
| 173 | + | |
184 | 174 | | |
185 | 175 | | |
186 | 176 | | |
| |||
0 commit comments