Skip to main content

spawn

Function spawn 

Source
pub fn spawn(watcher: Watcher) -> WatcherHandle
Expand description

Spawn a watch loop on a background tokio task. Returns a handle that stops the loop when dropped (the watcher’s internal channel closes when the task exits, which is fine for a process-lifetime dev server).