Function holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::metrics::metric_task_instrumented
source · pub fn metric_task_instrumented<T, E, F>(
scope: Option<String>,
f: F
) -> JoinHandle<Result<T, E>> ⓘwhere
T: 'static + Send,
E: 'static + Send + Debug,
F: 'static + Send + Future<Output = Result<T, E>>,
Expand description
Spawns a tokio task with given future/async block. Captures a new TaskCounter instance to track task count.