Commit b886551
committed
CCR 6
Install the abort listener before dispatching a factory operation.
`awaitFactoryOperation` evaluated `operation()` as the first element of the
race, so the listener was only attached afterwards. The window is synchronous
and hard to hit in practice, but it does not need to exist: an abort raised
while the thunk is starting would find no listener and the race would then wait
on an operation whose run had already been cancelled.
The listener is now attached first, and the aborted check moved after it, so
the ordering guarantees both properties directly — no abort can be missed, and
an already-aborted run still never dispatches.1 parent 85a443e commit b886551
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
316 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
317 | 319 | | |
318 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
319 | 325 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
| 326 | + | |
| 327 | + | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| |||
0 commit comments