Re-read the mmap to pick up new writes.
(&mut self)
| 254 | |
| 255 | /// Re-read the mmap to pick up new writes. |
| 256 | pub fn refresh(&mut self) -> std::io::Result<()> { |
| 257 | let mmap_path = self.dir.join(MMAP_FILENAME); |
| 258 | let file = std::fs::OpenOptions::new().read(true).open(&mmap_path)?; |
| 259 | self.mmap = unsafe { memmap2::Mmap::map(&file)? }; |
| 260 | Ok(()) |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | // ── TUI (tracedecay monitor command) ──────────────────────────────── |
no test coverage detected