Reorder removal so that mmap is removed before storage
This commit is contained in:
parent
816838cdf0
commit
00daae97ed
2 changed files with 15 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ use bitvec::{
|
|||
vec::BitVec,
|
||||
view::{AsBits, AsMutBits},
|
||||
};
|
||||
use tracing::trace;
|
||||
|
||||
pub trait BitV: Send + Sync {
|
||||
fn as_slice(&self) -> &BitSlice<u8, Msb0>;
|
||||
|
|
@ -24,6 +25,12 @@ pub struct MmapBitV {
|
|||
mmap: memmap2::MmapMut,
|
||||
}
|
||||
|
||||
impl Drop for MmapBitV {
|
||||
fn drop(&mut self) {
|
||||
trace!("dropping MmapBitV, this should unmap the .bitv file")
|
||||
}
|
||||
}
|
||||
|
||||
impl MmapBitV {
|
||||
pub fn new(file: File) -> anyhow::Result<Self> {
|
||||
let mmap =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue