mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-28 15:26:34 +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,
|
DB: Database + 'db,
|
||||||
Q: QueryFunction<DB>,
|
Q: QueryFunction<DB>,
|
||||||
{
|
{
|
||||||
|
// FIXME(#24) -- handle parallel case
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
let map = self.map.upgradable_read();
|
let mut map = self.map.write();
|
||||||
let mut map = RwLockUpgradableReadGuard::upgrade(map);
|
|
||||||
let _ = map.remove(self.key);
|
let _ = map.remove(self.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue