You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -531,21 +545,17 @@ impl<T: Watcher, C: FileIdCache> Drop for Debouncer<T, C> {
531
545
532
546
/// Creates a new debounced watcher with custom configuration.
533
547
///
534
-
/// Timeout is the amount of time after which a debounced event is emitted or a continuous event is send, if there still are events incoming for the specific path.
548
+
/// Timeout is the amount of time after which a debounced event is emitted.
535
549
///
536
-
/// If tick_rate is None, notify will select a tick rate that is less than the provided timeout.
537
-
pubfnnew_debouncer_opt<
538
-
F:DebounceEventHandler,
539
-
T:Watcher,
540
-
C:FileIdCache + Default + Send + 'static,
541
-
>(
550
+
/// If tick_rate is None, notify will select a tick rate that is 1/4 of the provided timeout.
let data = Arc::new(Mutex::new(DebounceDataInner::new(file_id_cache, timeout)));
549
559
let stop = Arc::new(AtomicBool::new(false));
550
560
551
561
let tick_div = 4;
@@ -567,11 +577,6 @@ pub fn new_debouncer_opt<
567
577
})?,
568
578
};
569
579
570
-
{
571
-
letmut data_w = data.lock();
572
-
data_w.timeout = timeout;
573
-
}
574
-
575
580
let data_c = data.clone();
576
581
let stop_c = stop.clone();
577
582
let thread = std::thread::Builder::new()
@@ -620,20 +625,21 @@ pub fn new_debouncer_opt<
620
625
Ok(guard)
621
626
}
622
627
623
-
/// Short function to create a new debounced watcher with the recommended debouncer.
628
+
/// Short function to create a new debounced watcher with the recommended debouncer and the built-in file ID cache.
624
629
///
625
-
/// Timeout is the amount of time after which a debounced event is emitted or a continuous event is send, if there still are events incoming for the specific path.
630
+
/// Timeout is the amount of time after which a debounced event is emitted.
626
631
///
627
-
/// If tick_rate is None, notify will select a tick rate that is less than the provided timeout.
632
+
/// If tick_rate is None, notify will select a tick rate that is 1/4 of the provided timeout.
0 commit comments