global: snapshot

This commit is contained in:
nym21
2025-04-10 21:38:39 +02:00
parent 139e93b2f0
commit 34b462d511
15 changed files with 228 additions and 37 deletions

View File

@@ -73,7 +73,7 @@ where
let mmap = Self::new_mmap(file)?;
self.mmap().store(mmap);
if self.guard().is_some() {
let guard = self.new_guard();
let guard = self.mmap().load();
self.mut_guard().replace(guard);
} else {
unreachable!("This function shouldn't be called in a cloned instance")