Skip to main content

wait_for_child_or_shutdown

Function wait_for_child_or_shutdown 

Source
async fn wait_for_child_or_shutdown(
    child: &mut Child,
    shutdown_rx: &mut Receiver<bool>,
) -> ChildOutcome
Expand description

Waits until either a shutdown request arrives or the child exits.

If waiting on the child fails, returns ChildOutcome::WaitFailed so the supervisor reaps the possibly-still-running child before restarting, rather than assuming it exited.