mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-27 12:54:42 +00:00
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 <nathan@zed.dev>
This commit is contained in:
parent
1e186d7235
commit
a2aa844ddd
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ impl Fs for RealFs {
|
||||||
path: &Path,
|
path: &Path,
|
||||||
latency: Duration,
|
latency: Duration,
|
||||||
) -> Pin<Box<dyn Send + Stream<Item = Vec<fsevent::Event>>>> {
|
) -> Pin<Box<dyn Send + Stream<Item = Vec<fsevent::Event>>>> {
|
||||||
let (mut tx, rx) = postage::mpsc::channel(64);
|
let (tx, rx) = smol::channel::unbounded();
|
||||||
let (stream, handle) = EventStream::new(&[path], latency);
|
let (stream, handle) = EventStream::new(&[path], latency);
|
||||||
std::mem::forget(handle);
|
std::mem::forget(handle);
|
||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
|
|
Loading…
Reference in a new issue