review fix: preserve idle waiter quiescence

This commit is contained in:
pku-xht
2026-07-20 13:15:11 +08:00
parent d9a9c223e4
commit da70e47048
8 changed files with 107 additions and 20 deletions

View File

@@ -398,7 +398,7 @@ export class ReactLoopAgent implements Agent {
cancelReason: () => this.cancelReason,
clearCancel: () => { this.cancelRequested = false },
withToolBatch: run => this.withToolBatch(run),
// Already-idle pre-start cancellation still must settle queued-work waiters.
// Pre-start cancellation settles queued-work waiters before publishing idle.
settleIdle: () => { this.settleIdleWaiters() },
}))
}