From 8990aa4568ea8a7481f827512b7487be4d39332a Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Tue, 5 Sep 2017 09:03:30 -0700 Subject: Comment about duration arg to file watcher --- src/config.rs | 1 + src/renderer/mod.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 3c57560c..61ca5544 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1474,6 +1474,7 @@ impl Monitor { Monitor { _thread: ::util::thread::spawn_named("config watcher", move || { let (tx, rx) = mpsc::channel(); + // The Duration argument is a debouncing period. let mut watcher = watcher(tx, Duration::from_millis(10)).unwrap(); let config_path = ::std::fs::canonicalize(path) .expect("canonicalize config path"); diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index eb8af395..60362f87 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -537,6 +537,7 @@ impl QuadRenderer { if cfg!(feature = "live-shader-reload") { ::std::thread::spawn(move || { let (tx, rx) = ::std::sync::mpsc::channel(); + // The Duration argument is a debouncing period. let mut watcher = watcher(tx, Duration::from_millis(10)).expect("create file watcher"); watcher.watch(TEXT_SHADER_F_PATH, RecursiveMode::NonRecursive) .expect("watch fragment shader"); -- cgit