From 478ba65f8da6ffd4a3fea09c6a4a1f0fb92e1c85 Mon Sep 17 00:00:00 2001 From: Emil Lauridsen Date: Wed, 15 Jan 2020 15:50:49 +0100 Subject: Manage check state updates in main_loop to reduce lock contention --- crates/ra_lsp_server/src/world.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_lsp_server/src/world.rs') diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index c0175c726..7a3030a51 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs @@ -13,7 +13,7 @@ use lsp_server::ErrorCode; use lsp_types::Url; use parking_lot::RwLock; use ra_cargo_watch::{ - url_from_path_with_drive_lowercasing, CheckOptions, CheckWatcher, CheckWatcherSharedState, + url_from_path_with_drive_lowercasing, CheckOptions, CheckState, CheckWatcher, }; use ra_ide::{ Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, @@ -64,7 +64,7 @@ pub struct WorldSnapshot { pub analysis: Analysis, pub vfs: Arc>, pub latest_requests: Arc>, - pub check_watcher: Arc>, + pub check_watcher: Arc>, } impl WorldState { @@ -220,7 +220,7 @@ impl WorldState { analysis: self.analysis_host.analysis(), vfs: Arc::clone(&self.vfs), latest_requests: Arc::clone(&self.latest_requests), - check_watcher: self.check_watcher.shared.clone(), + check_watcher: self.check_watcher.state.clone(), } } -- cgit v1.2.3