Skip to main content

spawn

Function spawn 

Source
pub fn spawn<P>(provider: P, poller: MultiplexedPoller) -> WatcherHandle
where P: Provider + Clone + 'static,
Expand description

Mint the shutdown token, spawn [run], and return the owning WatcherHandle, the only pairing of a live task with its shutdown token (#1236).