From 8baa2b727ddca404e65560de61ac2fb5e1224a5b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 15 Jul 2020 15:49:20 +0200 Subject: Check cancellation when updating imports recursively For winapi, this takes a lot of CPU time without doing queries and causes the main event loop to stall on cancellation. --- crates/ra_hir_def/src/nameres/collector.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_hir_def/src') diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 99ac730ba..6494b653a 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs @@ -573,6 +573,7 @@ impl DefCollector<'_> { vis: Visibility, import_type: ImportType, ) { + self.db.check_canceled(); self.update_recursive(module_id, resolutions, vis, import_type, 0) } -- cgit v1.2.3