(start: u64, file: Arc<RwLock<File>>, buffer_size: usize)
| 45 | |
| 46 | impl BufferRegion { |
| 47 | fn new(start: u64, file: Arc<RwLock<File>>, buffer_size: usize) -> Self { |
| 48 | BufferRegion { |
| 49 | start, |
| 50 | buffer: RwLock::new(vec![0; buffer_size]), |
| 51 | dirty: AtomicBool::new(false), |
| 52 | end: AtomicUsize::new(0), |
| 53 | file, |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | fn should_final_flush(&self) -> bool { |
| 58 | self.dirty.load(Ordering::SeqCst) |
nothing calls this directly
no test coverage detected