Commit b97d337
fix(sync): discard pending delayed tasks on shutdown
Move delayed task cleanup from the shutdown pre-prune pass into the
worker thread itself. When the worker encounters a delayed task that
is not yet ready and shutdown has been signaled, it discards all
remaining tasks. This catches tasks submitted during execution that
the one-time pre-prune in shutdown could not see.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent a399d2a commit b97d337
2 files changed
Lines changed: 12 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
| |||
419 | 429 | | |
420 | 430 | | |
421 | 431 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | 432 | | |
447 | 433 | | |
448 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | 350 | | |
353 | 351 | | |
354 | 352 | | |
| |||
357 | 355 | | |
358 | 356 | | |
359 | 357 | | |
360 | | - | |
| 358 | + | |
361 | 359 | | |
362 | 360 | | |
363 | 361 | | |
364 | | - | |
365 | 362 | | |
366 | 363 | | |
367 | 364 | | |
0 commit comments