diff options
author | Aleksey Kladov <[email protected]> | 2018-10-15 20:29:24 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-15 20:29:24 +0100 |
commit | bbcd998433075aba66ef0677bcdd821ca5fc926e (patch) | |
tree | 58130242a9a726bb552d01f5c72d1c4d13ead701 /crates/ra_analysis/src/db.rs | |
parent | 76c51fae77d5dc2d7791132ecc78e444118e48de (diff) |
make analysis sync
Diffstat (limited to 'crates/ra_analysis/src/db.rs')
-rw-r--r-- | crates/ra_analysis/src/db.rs | 14 |
1 files changed, 14 insertions, 0 deletions
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 { | |||
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
33 | impl salsa::ParallelDatabase for RootDatabase { | ||
34 | fn fork(&self) -> Self { | ||
35 | RootDatabase { | ||
36 | runtime: self.runtime.fork(), | ||
37 | } | ||
38 | } | ||
39 | } | ||
40 | |||
41 | impl Clone for RootDatabase { | ||
42 | fn clone(&self) -> RootDatabase { | ||
43 | salsa::ParallelDatabase::fork(self) | ||
44 | } | ||
45 | } | ||
46 | |||
33 | salsa::database_storage! { | 47 | salsa::database_storage! { |
34 | pub(crate) struct RootDatabaseStorage for RootDatabase { | 48 | pub(crate) struct RootDatabaseStorage for RootDatabase { |
35 | impl FilesDatabase { | 49 | impl FilesDatabase { |