route_until

Function route_until 

Source
pub fn route_until<const N: usize, W: WaitStrategy>(
    router: &FanoutRouter<N>,
    cfg: RouterLoopConfig,
    wait: &mut W,
    should_stop: impl FnMut() -> bool,
) -> RouterCounters
Expand description

Run a fanout router until should_stop() returns true.

ยงContract

  • should_stop should be cheap and side-effect free; it may be called frequently.
  • The provided [WaitStrategy] is used for idle/backpressure waits and is reset after any successful routing step.