Skip to main content

run_bounded

Function run_bounded 

Source
pub async fn run_bounded<F, Fut>(
    plan: BoundedPlan,
    stop: Stop,
    place: F,
) -> BoundedOutcome
where F: Fn(usize, Stop) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<(), Cause>> + Send + 'static,
Expand description

Run a finitely bounded plan, stopping admission and draining every owned call before return.

The call future receives the same Stop as the scheduler. Once it has established a call it should select that signal alongside its normal holding period, then perform its protocol cleanup before returning. The harness never detaches work: even a cleanup-budget failure aborts and joins every local task before it reports that cleanup was incomplete.