pub fn spawn_tracked<F, T>(name: T, future: F) -> JoinHandle<F::Output>Expand description
Spawn a tracked task on the async-std runtime
This function spawns a task and automatically tracks it in the global Inspector.
ยงExamples
use async_inspect::runtime::async_std::spawn_tracked;
async_std::task::block_on(async {
let handle = spawn_tracked("my_task", async {
// Your async code here
42
});
let result = handle.await;
println!("Result: {}", result);
});