move thread worker to a separate crate

This commit is contained in:
Aleksey Kladov 2018-12-18 12:45:20 +03:00
parent 4a1ab869b7
commit 193992fd14
9 changed files with 62 additions and 46 deletions

View file

@ -10,6 +10,7 @@ use gen_lsp_server::{
use languageserver_types::NumberOrString;
use ra_analysis::{Canceled, FileId, LibraryData};
use rayon;
use thread_worker::Worker;
use threadpool::ThreadPool;
use rustc_hash::FxHashSet;
use serde::{de::DeserializeOwned, Serialize};
@ -21,7 +22,6 @@ use crate::{
project_model::{workspace_loader, CargoWorkspace},
req,
server_world::{ServerWorld, ServerWorldState},
thread_watcher::Worker,
vfs::{self, FileEvent},
Result,
};
@ -92,8 +92,8 @@ pub fn main_loop(
let ws_res = ws_watcher.stop();
main_res?;
fs_res?;
ws_res?;
fs_res.map_err(|_| format_err!("fs watcher died"))?;
ws_res.map_err(|_| format_err!("ws watcher died"))?;
Ok(())
}