aboutsummaryrefslogtreecommitdiff
path: root/incria/src/thunk.rs
diff options
context:
space:
mode:
authortcmal <tcmal>2023-06-17 14:21:15 +0000
committerAria <me@aria.rip>2023-10-01 17:31:30 +0100
commit3291ea405b60695a25703e713c7fc47dda602e8d (patch)
tree64a6e3d48c9ed1e7497d13b72f4979642a88637a /incria/src/thunk.rs
parent4dae16cae8d76f73dea60f09042b0c4b6585408c (diff)
avoid deadlocks by no longer returning read guard
Diffstat (limited to 'incria/src/thunk.rs')
-rw-r--r--incria/src/thunk.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/incria/src/thunk.rs b/incria/src/thunk.rs
index 937f109..2fe7873 100644
--- a/incria/src/thunk.rs
+++ b/incria/src/thunk.rs
@@ -19,6 +19,10 @@ impl<T> ThunkBackend<T> {
pub fn new(thunk: T) -> Self {
Self { thunk }
}
+
+ pub fn thunk(&self) -> &T {
+ &self.thunk
+ }
}
impl<K, V: 'static, T> LazyMappingBackend<K, V> for ThunkBackend<T>