remove synthetic_write from Runtime

This commit is contained in:
XFFXFF 2022-08-25 13:46:58 +08:00
parent f899551962
commit 266505d58e
2 changed files with 1 additions and 14 deletions

View file

@ -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.

View file

@ -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) {