wait_for_first_task

Function wait_for_first_task 

Source
pub async fn wait_for_first_task(
    tasks: Vec<NamedTask>,
) -> (&'static str, Result<Result<()>, JoinError>)
Expand description

Wait for the first task in the set to complete and return its name alongside the join result.

For long-running services (server, job worker, cron) any task exiting is typically an error — use this to detect which one stopped.