Skip to main content

stop

Function stop 

Source
pub async fn stop(
    manager: &Manager,
    root: TaskIdentifier,
    keep: &[TaskIdentifier],
    now: impl Fn() -> Duration,
    budget: Duration,
) -> Result<(), Error>
Expand description

Ask every descendant of root to terminate, except the subtrees rooted at keep (runtime services stopped by the driver stage), and wait until they are gone or budget elapsed on the monotonic clock now.

Tasks are tracked once discovered, so children that outlive their parent (and therefore lose their place under root) are still waited for. Signals go to the most recently discovered (deepest) tasks first and are resent on every check; delivery is idempotent.