Skip to main content

run

Function run 

Source
pub async fn run<F, R>(
    command: Command,
    cancellation: CancellationToken,
    register: F,
) -> Result<Output, Error>
where F: FnOnce(ChildIdentity) -> R + Send + 'static, R: Future<Output = Result<()>> + Send + 'static,
Expand description

Register the inert child before allowing exec. A rejected, cancelled, or timed-out registration cannot start user code. The callback must not block its executor. Dropping this future cancels execution; its supervisor still kills and reaps it.