Function spawn
pub fn spawn<F>(future: F) -> JoinHandle<<F as Future>::Output> ⓘAvailable on crate feature
dial9 only.Expand description
Spawn a traced task on the current tokio runtime.
Like [tokio::spawn], but wraps the future with wake-event tracking
when called from a thread owned by a dial9 runtime. On other threads,
falls back to plain [tokio::spawn].
Equivalent to TelemetryHandle::current().spawn(future).
§Panics
Panics if called from outside a tokio runtime context (same
as [tokio::spawn]).