Skip to main content

spawn

Function spawn 

Source
pub fn spawn(
    registry: Arc<SessionsRegistry>,
    token: CancellationToken,
) -> JoinHandle<()>
Expand description

Spawns the watcher loop, returning its JoinHandle.

The loop rescans every [WATCH_INTERVAL] and feeds every sighting to registry, until token is cancelled. A no-op loop when no transcripts root can be resolved (it parks on the cancel token). Must be called from within a tokio runtime.