automatically wait for worker threads

closes #817
This commit is contained in:
Aleksey Kladov
2019-02-14 20:43:45 +03:00
parent 10bf61b83b
commit bf352cd251
10 changed files with 136 additions and 155 deletions

View File

@@ -1,6 +1,6 @@
use std::path::PathBuf;
use thread_worker::{WorkerHandle, Worker};
use thread_worker::Worker;
use crate::Result;
@@ -8,8 +8,8 @@ pub use ra_project_model::{
ProjectWorkspace, CargoWorkspace, Package, Target, TargetKind, Sysroot,
};
pub fn workspace_loader() -> (Worker<PathBuf, Result<ProjectWorkspace>>, WorkerHandle) {
thread_worker::spawn::<PathBuf, Result<ProjectWorkspace>, _>(
pub fn workspace_loader() -> Worker<PathBuf, Result<ProjectWorkspace>> {
Worker::<PathBuf, Result<ProjectWorkspace>>::spawn(
"workspace loader",
1,
|input_receiver, output_sender| {