aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-12-30 20:23:31 +0000
committerAleksey Kladov <[email protected]>2018-12-30 20:23:31 +0000
commitc2c10b9014549e9c0783fb13dc202dfab6e6fd0a (patch)
treed4b2a47910df5effb14271ab72a1602b5f77ee81 /crates/ra_vfs
parenteffc1eae8be338ea949058cc89c39950c25858c5 (diff)
:arrow_up: crossbeam
closes #189
Diffstat (limited to 'crates/ra_vfs')
-rw-r--r--crates/ra_vfs/Cargo.toml2
-rw-r--r--crates/ra_vfs/src/io.rs4
-rw-r--r--crates/ra_vfs/src/lib.rs2
3 files changed, 5 insertions, 3 deletions
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 <[email protected]>"]
8walkdir = "2.2.7" 8walkdir = "2.2.7"
9relative-path = "0.4.0" 9relative-path = "0.4.0"
10rustc-hash = "1.0" 10rustc-hash = "1.0"
11crossbeam-channel = "0.2.4" 11crossbeam-channel = "0.3.5"
12log = "0.4.6" 12log = "0.4.6"
13 13
14thread_worker = { path = "../thread_worker" } 14thread_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<Task, TaskResult>;
32pub(crate) fn start() -> (Worker, WorkerHandle) { 32pub(crate) fn start() -> (Worker, WorkerHandle) {
33 thread_worker::spawn("vfs", 128, |input_receiver, output_sender| { 33 thread_worker::spawn("vfs", 128, |input_receiver, output_sender| {
34 input_receiver 34 input_receiver
35 .into_iter()
35 .map(handle_task) 36 .map(handle_task)
36 .for_each(|it| output_sender.send(it)) 37 .try_for_each(|it| output_sender.send(it))
38 .unwrap()
37 }) 39 })
38} 40}
39 41
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 {
148 path: path.clone(), 148 path: path.clone(),
149 filter: Box::new(filter), 149 filter: Box::new(filter),
150 }; 150 };
151 res.worker.inp.send(task); 151 res.worker.inp.send(task).unwrap();
152 } 152 }
153 let roots = res.roots.iter().map(|(id, _)| id).collect(); 153 let roots = res.roots.iter().map(|(id, _)| id).collect();
154 (res, roots) 154 (res, roots)