mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-26 14:46:57 +00:00
Simplify map
write to exclusive write access
This commit is contained in:
parent
917ca42f04
commit
7198902ebd
1 changed files with 2 additions and 2 deletions
|
@ -539,9 +539,9 @@ where
|
|||
DB: Database + 'db,
|
||||
Q: QueryFunction<DB>,
|
||||
{
|
||||
// FIXME(#24) -- handle parallel case
|
||||
fn drop(&mut self) {
|
||||
let map = self.map.upgradable_read();
|
||||
let mut map = RwLockUpgradableReadGuard::upgrade(map);
|
||||
let mut map = self.map.write();
|
||||
let _ = map.remove(self.key);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue