From 483a5bc9c850f3144cfbdf51a272bbcadbdc5934 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 29 Mar 2021 21:08:07 +0300 Subject: internal: track missing `.check_cancelled` --- crates/base_db/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/base_db') diff --git a/crates/base_db/src/lib.rs b/crates/base_db/src/lib.rs index 5f77a0b1f..980a0ed98 100644 --- a/crates/base_db/src/lib.rs +++ b/crates/base_db/src/lib.rs @@ -59,6 +59,8 @@ pub trait CheckCanceled { Self: Sized + panic::RefUnwindSafe, F: FnOnce(&Self) -> T + panic::UnwindSafe, { + // Uncomment to debug missing cancellations. + // let _span = profile::heartbeat_span(); panic::catch_unwind(|| f(self)).map_err(|err| match err.downcast::() { Ok(canceled) => *canceled, Err(payload) => panic::resume_unwind(payload), @@ -68,6 +70,7 @@ pub trait CheckCanceled { impl CheckCanceled for T { fn check_canceled(&self) { + // profile::heartbeat(); if self.salsa_runtime().is_current_revision_canceled() { Canceled::throw() } -- cgit v1.2.3