Skip to main content

spawn_named_tracked_task

Function spawn_named_tracked_task 

Source
pub fn spawn_named_tracked_task<F, T>(
    name: &'static str,
    fut: F,
) -> JoinHandle<T> ⓘ
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

spawn_tracked_task with a name that a drain timeout can print.

The name is a short static string describing the task, never a formatted or caller-supplied value: it is read by an operator staring at a shutdown that would not finish, so it is a label for a call site, not a record of one occurrence.