aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/prime_caches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/prime_caches.rs')
-rw-r--r--crates/ide/src/prime_caches.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/prime_caches.rs b/crates/ide/src/prime_caches.rs
index ea0acfaa0..d912a01b8 100644
--- a/crates/ide/src/prime_caches.rs
+++ b/crates/ide/src/prime_caches.rs
@@ -27,6 +27,8 @@ pub(crate) fn prime_caches(db: &RootDatabase, cb: &(dyn Fn(PrimeCachesProgress)
27 let topo = &graph.crates_in_topological_order(); 27 let topo = &graph.crates_in_topological_order();
28 28
29 cb(PrimeCachesProgress::Started); 29 cb(PrimeCachesProgress::Started);
30 // Take care to emit the finish signal even when the computation is canceled.
31 let _d = stdx::defer(|| cb(PrimeCachesProgress::Finished));
30 32
31 // FIXME: This would be easy to parallelize, since it's in the ideal ordering for that. 33 // FIXME: This would be easy to parallelize, since it's in the ideal ordering for that.
32 // Unfortunately rayon prevents panics from propagation out of a `scope`, which breaks 34 // Unfortunately rayon prevents panics from propagation out of a `scope`, which breaks
@@ -41,6 +43,4 @@ pub(crate) fn prime_caches(db: &RootDatabase, cb: &(dyn Fn(PrimeCachesProgress)
41 }); 43 });
42 db.crate_def_map(*krate); 44 db.crate_def_map(*krate);
43 } 45 }
44
45 cb(PrimeCachesProgress::Finished);
46} 46}