pub fn spawn_with_killswitch<M, T>(name: &str, metrics: M, future: T)
Expand description
Spawn a potentially instrumented, long-lived task. Integrates with task-killswitch.
Depending on whether the tokio-task-metrics
feature is enabled, this may
instrument the task and collect metrics for it.