tick_queue_arm called list_active_queue_consumers() and then iterated serially, awaiting one queue.claim(app, queue) per consumer. With N consumers and a 100ms tick the worst-case throughput was N × (claim + executor) / tick — one slow handler blocked every other queue's progress on the dispatcher's task. Replace the for-loop with `futures::stream::iter(consumers) .for_each_concurrent(QUEUE_DISPATCH_PARALLELISM, …)`. The execution gate already caps real script-concurrency to its permits, so this just removes the dispatcher-side serialization. QUEUE_DISPATCH_PARALLELISM = 32 (matches the default gate). Workspace gains `futures = 0.3` so `for_each_concurrent` is available. AUDIT.md anchor: F-P-007. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
100 KiB
100 KiB