mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
internal: fix deadlock introduced by #16643
This commit is contained in:
parent
12144045fe
commit
64779737db
@ -146,11 +146,14 @@ where
|
||||
revision: Revision,
|
||||
) -> bool {
|
||||
debug_assert!(revision < db.salsa_runtime().current_revision());
|
||||
let read = &self.slot_map.read();
|
||||
let read = self.slot_map.read();
|
||||
let Some((key, slot)) = read.get_index(index as usize) else {
|
||||
return false;
|
||||
};
|
||||
slot.maybe_changed_after(db, revision, key)
|
||||
let (key, slot) = (key.clone(), slot.clone());
|
||||
// note: this drop is load-bearing. removing it would causes deadlocks.
|
||||
drop(read);
|
||||
slot.maybe_changed_after(db, revision, &key)
|
||||
}
|
||||
|
||||
fn fetch(&self, db: &<Q as QueryDb<'_>>::DynDb, key: &Q::Key) -> Q::Value {
|
||||
|
Loading…
Reference in New Issue
Block a user