complete mysterious comments

This commit is contained in:
Niko Matsakis 2019-06-16 06:32:37 -04:00
parent 11aba6ad2b
commit 85848e1bbf

View file

@ -252,7 +252,7 @@ where
fn intern_check(&self, db: &DB, key: &Q::Key) -> Option<StampedValue<InternId>> {
let revision_now = db.salsa_runtime().current_revision();
// First,
// First, try with read lock -- this only works if `accessed_at` is up to date.
{
let tables = self.tables.read();
let &index = tables.map.get(key)?;
@ -282,7 +282,7 @@ where
}
}
// Next,
// Acquire write lock if necessary.
let mut tables = self.tables.write();
let &index = tables.map.get(key)?;
match &mut tables.values[index.as_usize()] {