MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / refresh

Method refresh

src/monitor.rs:256–261  ·  view source on GitHub ↗

Re-read the mmap to pick up new writes.

(&mut self)

Source from the content-addressed store, hash-verified

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) ────────────────────────────────

Callers 1

monitor_loopFunction · 0.45

Calls 2

openMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected