We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1214404 + 6477973 commit 03b3cb6Copy full SHA for 03b3cb6
crates/salsa/src/derived.rs
@@ -146,11 +146,14 @@ where
146
revision: Revision,
147
) -> bool {
148
debug_assert!(revision < db.salsa_runtime().current_revision());
149
- let read = &self.slot_map.read();
+ let read = self.slot_map.read();
150
let Some((key, slot)) = read.get_index(index as usize) else {
151
return false;
152
};
153
- slot.maybe_changed_after(db, revision, key)
+ let (key, slot) = (key.clone(), slot.clone());
154
+ // note: this drop is load-bearing. removing it would causes deadlocks.
155
+ drop(read);
156
+ slot.maybe_changed_after(db, revision, &key)
157
}
158
159
fn fetch(&self, db: &<Q as QueryDb<'_>>::DynDb, key: &Q::Key) -> Q::Value {
0 commit comments