From a2aa844ddd1b6dedcab957b88c73da0d9a49c323 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 4 Feb 2022 16:31:34 +0100 Subject: [PATCH] Buffer all incoming file-system events This avoids a problem where the operating system would drop events on the floor and tell us to rescan the entire directory, which in turn would cause a flicker in the project browser. Co-Authored-By: Nathan Sobo --- crates/project/src/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/project/src/fs.rs b/crates/project/src/fs.rs index a26b5ed8f7..994f60fb1f 100644 --- a/crates/project/src/fs.rs +++ b/crates/project/src/fs.rs @@ -115,7 +115,7 @@ impl Fs for RealFs { path: &Path, latency: Duration, ) -> Pin>>> { - let (mut tx, rx) = postage::mpsc::channel(64); + let (tx, rx) = smol::channel::unbounded(); let (stream, handle) = EventStream::new(&[path], latency); std::mem::forget(handle); std::thread::spawn(move || {