From c2c10b9014549e9c0783fb13dc202dfab6e6fd0a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 30 Dec 2018 23:23:31 +0300 Subject: :arrow_up: crossbeam closes #189 --- crates/ra_vfs/Cargo.toml | 2 +- crates/ra_vfs/src/io.rs | 4 +++- crates/ra_vfs/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'crates/ra_vfs') diff --git a/crates/ra_vfs/Cargo.toml b/crates/ra_vfs/Cargo.toml index ccea8a866..7c170cdfc 100644 --- a/crates/ra_vfs/Cargo.toml +++ b/crates/ra_vfs/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Aleksey Kladov "] walkdir = "2.2.7" relative-path = "0.4.0" rustc-hash = "1.0" -crossbeam-channel = "0.2.4" +crossbeam-channel = "0.3.5" log = "0.4.6" thread_worker = { path = "../thread_worker" } diff --git a/crates/ra_vfs/src/io.rs b/crates/ra_vfs/src/io.rs index 4cfdb83da..80328ad18 100644 --- a/crates/ra_vfs/src/io.rs +++ b/crates/ra_vfs/src/io.rs @@ -32,8 +32,10 @@ pub(crate) type Worker = thread_worker::Worker; pub(crate) fn start() -> (Worker, WorkerHandle) { thread_worker::spawn("vfs", 128, |input_receiver, output_sender| { input_receiver + .into_iter() .map(handle_task) - .for_each(|it| output_sender.send(it)) + .try_for_each(|it| output_sender.send(it)) + .unwrap() }) } diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs index 90d5e21f4..757eac95b 100644 --- a/crates/ra_vfs/src/lib.rs +++ b/crates/ra_vfs/src/lib.rs @@ -148,7 +148,7 @@ impl Vfs { path: path.clone(), filter: Box::new(filter), }; - res.worker.inp.send(task); + res.worker.inp.send(task).unwrap(); } let roots = res.roots.iter().map(|(id, _)| id).collect(); (res, roots) -- cgit v1.2.3