From 266505d58e13bfb4daed0174278acb213cfce6a7 Mon Sep 17 00:00:00 2001 From: XFFXFF <1247714429@qq.com> Date: Thu, 25 Aug 2022 13:46:58 +0800 Subject: [PATCH] remove synthetic_write from Runtime --- components/salsa-2022/src/database.rs | 2 +- components/salsa-2022/src/runtime.rs | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/components/salsa-2022/src/database.rs b/components/salsa-2022/src/database.rs index 2ec031b3..64599196 100644 --- a/components/salsa-2022/src/database.rs +++ b/components/salsa-2022/src/database.rs @@ -20,7 +20,7 @@ pub trait Database: HasJarsDyn + AsSalsaDatabase { /// will block until that snapshot is dropped -- if that snapshot /// is owned by the current thread, this could trigger deadlock. fn synthetic_write(&mut self, durability: Durability) { - self.runtime_mut().synthetic_write(durability); + self.runtime_mut().report_tracked_write(durability); } /// Reports that the query depends on some state unknown to salsa. diff --git a/components/salsa-2022/src/runtime.rs b/components/salsa-2022/src/runtime.rs index aa0895cf..c4a03b58 100644 --- a/components/salsa-2022/src/runtime.rs +++ b/components/salsa-2022/src/runtime.rs @@ -144,19 +144,6 @@ impl Runtime { } } - /// A "synthetic write" causes the system to act *as though* some - /// input of durability `durability` has changed. This is mostly - /// useful for profiling scenarios. - /// - /// **WARNING:** Just like an ordinary write, this method triggers - /// cancellation. If you invoke it while a snapshot exists, it - /// will block until that snapshot is dropped -- if that snapshot - /// is owned by the current thread, this could trigger deadlock. - pub fn synthetic_write(&mut self, durability: Durability) { - self.new_revision(); - self.report_tracked_write(durability) - } - /// Adds `key` to the list of output created by the current query /// (if not already present). pub(crate) fn add_output(&self, key: DependencyIndex) {