Comment about duration arg to file watcher
This commit is contained in:
parent
2f095d4096
commit
8990aa4568
|
@ -1474,6 +1474,7 @@ impl Monitor {
|
||||||
Monitor {
|
Monitor {
|
||||||
_thread: ::util::thread::spawn_named("config watcher", move || {
|
_thread: ::util::thread::spawn_named("config watcher", move || {
|
||||||
let (tx, rx) = mpsc::channel();
|
let (tx, rx) = mpsc::channel();
|
||||||
|
// The Duration argument is a debouncing period.
|
||||||
let mut watcher = watcher(tx, Duration::from_millis(10)).unwrap();
|
let mut watcher = watcher(tx, Duration::from_millis(10)).unwrap();
|
||||||
let config_path = ::std::fs::canonicalize(path)
|
let config_path = ::std::fs::canonicalize(path)
|
||||||
.expect("canonicalize config path");
|
.expect("canonicalize config path");
|
||||||
|
|
|
@ -537,6 +537,7 @@ impl QuadRenderer {
|
||||||
if cfg!(feature = "live-shader-reload") {
|
if cfg!(feature = "live-shader-reload") {
|
||||||
::std::thread::spawn(move || {
|
::std::thread::spawn(move || {
|
||||||
let (tx, rx) = ::std::sync::mpsc::channel();
|
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");
|
let mut watcher = watcher(tx, Duration::from_millis(10)).expect("create file watcher");
|
||||||
watcher.watch(TEXT_SHADER_F_PATH, RecursiveMode::NonRecursive)
|
watcher.watch(TEXT_SHADER_F_PATH, RecursiveMode::NonRecursive)
|
||||||
.expect("watch fragment shader");
|
.expect("watch fragment shader");
|
||||||
|
|
Loading…
Reference in New Issue