pub fn route_until_with_credit_stats<const N: usize, W: WaitStrategy>(
router: &FanoutRouter<N>,
cfg: RouterLoopConfig,
wait: &mut W,
credit_stats: &mut CreditStats<N>,
should_stop: impl FnMut() -> bool,
) -> RouterCountersExpand description
Run a fanout router until should_stop() returns true, returning aggregate counters.
If cfg.credit is enabled, credit_stats is updated in place.
ยงBackpressure and blocking
- For broadcast routing, destination-full remains drop-on-full.
- For work-queue routing, backpressure policies can avoid dequeuing the next source message when no consumer can accept it.
- With
BackpressurePolicy::Block, the router uses wake sections when present; if wake waits fail at runtime, the loop falls back towait.wait().