summaryrefslogtreecommitdiff
path: root/src/Erebos/Storage/Memory.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-12-31 20:20:23 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2024-12-31 20:20:23 +0100
commit7ad3fb235dde2e0be8adc0feeb890da438c70eff (patch)
tree38d0b6a44692dc4e4d146558097a15077c89e46a /src/Erebos/Storage/Memory.hs
parent6cc15c6cd859070fda1b46995108fbfc3e13a5db (diff)
Use evaluate to force digest before storing to backend
Diffstat (limited to 'src/Erebos/Storage/Memory.hs')
-rw-r--r--src/Erebos/Storage/Memory.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Erebos/Storage/Memory.hs b/src/Erebos/Storage/Memory.hs
index dd382b6..677e8c5 100644
--- a/src/Erebos/Storage/Memory.hs
+++ b/src/Erebos/Storage/Memory.hs
@@ -5,7 +5,6 @@ module Erebos.Storage.Memory (
) where
import Control.Concurrent.MVar
-import Control.DeepSeq
import Data.ByteArray (ScrubbedBytes)
import Data.ByteString.Lazy qualified as BL
@@ -46,8 +45,7 @@ instance (StorageCompleteness c, Typeable p) => StorageBackend (MemoryStorage p
M.lookup dgst <$> readMVar memObjs
backendStoreBytes StorageMemory {..} dgst raw =
- dgst `deepseq` -- the TVar may be accessed when evaluating the data to be written
- modifyMVar_ memObjs (return . M.insert dgst raw)
+ modifyMVar_ memObjs (return . M.insert dgst raw)
backendLoadHeads StorageMemory {..} tid = do