Skip to main content

spawn_at

Function spawn_at 

Source
pub fn spawn_at<F>(
    future: F,
    meta: SpawnMeta,
) -> JoinHandle<<F as Future>::Output> 
where F: Future + 'static,
Available on crate feature runtime only.
Expand description

Spawns a new asynchronous task, attributing it to meta instead of to the caller.

See Runtime::spawn_at for what meta is good for.

§Panics

This method doesn’t create runtime. It tries to obtain the current runtime by Runtime::with_current.