Skip to main content

spawn_watcher

Function spawn_watcher 

Source
pub fn spawn_watcher(kg_arc: Arc<GraphHandle>, path: String, project: &str)
Expand description

Spawn a background thread that watches path (recursively) for file modifications and re-indexes changed files under the given project.

kg_arc is the project’s handle; the thread holds it to pin the canonical instance open. The watcher debounces events for 2 seconds of quiet before triggering a re-index batch.