From bbcd998433075aba66ef0677bcdd821ca5fc926e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 15 Oct 2018 22:29:24 +0300 Subject: make analysis sync --- crates/ra_analysis/src/db.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 0773edcc1..c69577233 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -30,6 +30,20 @@ impl salsa::Database for RootDatabase { } } +impl salsa::ParallelDatabase for RootDatabase { + fn fork(&self) -> Self { + RootDatabase { + runtime: self.runtime.fork(), + } + } +} + +impl Clone for RootDatabase { + fn clone(&self) -> RootDatabase { + salsa::ParallelDatabase::fork(self) + } +} + salsa::database_storage! { pub(crate) struct RootDatabaseStorage for RootDatabase { impl FilesDatabase { -- cgit v1.2.3