pub async fn drain_dispatcher<DispatchFn, DispatchFut, CountFn, CountFut, Error>(
max_rounds: usize,
processing_poll_interval: Duration,
dispatch_due: DispatchFn,
count_processing: CountFn,
) -> Result<DispatchStats, Error>Expand description
Drains a dispatcher until it has no claimed work and no active processing tasks.
Product crates provide the real dispatch function and processing-count query. The helper keeps the shared bounded retry loop and aggregate statistics in Forge while leaving storage and status semantics outside this crate.
ยงErrors
Returns an error when dispatching or counting remaining work fails.