Add lazy store

This commit is contained in:
Tony
2024-10-03 10:52:12 +08:00
parent 6cdaa31959
commit 79bc8d08f4
4 changed files with 255 additions and 107 deletions
+3
View File
@@ -463,6 +463,9 @@ impl<R: Runtime> Store<R> {
self.store.lock().unwrap().save()
}
/// Removes the store from the resource table,
/// this doesn't remove other references of the same store held by you,
/// and the store is only truely closed once all reference held by you are also dropped
pub fn close_store(self) {
let store = self.store.lock().unwrap();
let app = store.app.clone();