test(db): add abort-racing-send + rejectAllWaiters coverage; document notifyOneWaiter invariant
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -274,6 +274,7 @@ export class MailboxStore {
|
||||
});
|
||||
}
|
||||
|
||||
// Invariant: synchronous from consumeOne to resolve. Introducing an `await` between them risks marking a message delivered with no listener to receive it.
|
||||
private notifyOneWaiter(name: string): void {
|
||||
const bucket = this.waiters.get(name);
|
||||
if (!bucket || bucket.size === 0) return;
|
||||
|
||||
Reference in New Issue
Block a user