mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-03 15:52:55 +00:00
Compare commits
2 Commits
column-rea
...
polling
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22a702c17f | ||
|
|
14f0c6d01a |
@@ -142,7 +142,7 @@ impl MmapCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct WatcherWrapper {
|
struct WatcherWrapper {
|
||||||
_watcher: Mutex<notify::RecommendedWatcher>,
|
_watcher: Mutex<notify::PollWatcher>,
|
||||||
watcher_router: Arc<WatchCallbackList>,
|
watcher_router: Arc<WatchCallbackList>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ impl WatcherWrapper {
|
|||||||
pub fn new(path: &Path) -> Result<Self, OpenDirectoryError> {
|
pub fn new(path: &Path) -> Result<Self, OpenDirectoryError> {
|
||||||
let (tx, watcher_recv): (Sender<RawEvent>, Receiver<RawEvent>) = channel();
|
let (tx, watcher_recv): (Sender<RawEvent>, Receiver<RawEvent>) = channel();
|
||||||
// We need to initialize the
|
// We need to initialize the
|
||||||
let watcher = notify::raw_watcher(tx)
|
let watcher = notify::poll::PollWatcher::with_delay_ms(tx, 1)
|
||||||
.and_then(|mut watcher| {
|
.and_then(|mut watcher| {
|
||||||
watcher.watch(path, RecursiveMode::Recursive)?;
|
watcher.watch(path, RecursiveMode::Recursive)?;
|
||||||
Ok(watcher)
|
Ok(watcher)
|
||||||
|
|||||||
Reference in New Issue
Block a user