mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2025-12-30 14:02:55 +00:00
Compare commits
2 Commits
prefix-phr
...
polling
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22a702c17f | ||
|
|
14f0c6d01a |
@@ -142,7 +142,7 @@ impl MmapCache {
|
||||
}
|
||||
|
||||
struct WatcherWrapper {
|
||||
_watcher: Mutex<notify::RecommendedWatcher>,
|
||||
_watcher: Mutex<notify::PollWatcher>,
|
||||
watcher_router: Arc<WatchCallbackList>,
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ impl WatcherWrapper {
|
||||
pub fn new(path: &Path) -> Result<Self, OpenDirectoryError> {
|
||||
let (tx, watcher_recv): (Sender<RawEvent>, Receiver<RawEvent>) = channel();
|
||||
// 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| {
|
||||
watcher.watch(path, RecursiveMode::Recursive)?;
|
||||
Ok(watcher)
|
||||
|
||||
Reference in New Issue
Block a user