File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -771,7 +771,7 @@ withTransferrableReadAccess h rr f = getEnv h $ \ldbEnv -> do
771771 -- the forker was opened.
772772 join $ readTVarIO tv
773773 )
774- runReadLocked (acquireAtTarget ldbEnv f >>= traverse (newForker h ldbEnv tv rr))
774+ unsafeRunReadLocked (acquireAtTarget ldbEnv f >>= traverse (newForker h ldbEnv tv rr))
775775
776776-- | Acquire both a value handle and a db changelog at the tip. Holds a read lock
777777-- while doing so.
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ mkLedgerDBLock :: IOLike m => m (LedgerDBLock m)
5959mkLedgerDBLock = LedgerDBLock <$> Lock. new ()
6060
6161-- | An action in @m@ that has to hold the read lock. See @withReadLock@.
62- newtype ReadLocked m a = ReadLocked { runReadLocked :: m a }
62+ newtype ReadLocked m a = ReadLocked { unsafeRunReadLocked :: m a }
6363 deriving newtype (Functor , Applicative , Monad )
6464
6565-- | Enforce that the action has to be run while holding the read lock.
@@ -69,7 +69,7 @@ readLocked = ReadLocked
6969-- | Acquire the ledger DB read lock and hold it while performing an action
7070withReadLock :: IOLike m => LedgerDBLock m -> ReadLocked m a -> m a
7171withReadLock (LedgerDBLock lock) m =
72- Lock. withReadAccess lock (\ () -> runReadLocked m)
72+ Lock. withReadAccess lock (\ () -> unsafeRunReadLocked m)
7373
7474-- | An action in @m@ that has to hold the write lock. See @withWriteLock@.
7575newtype WriteLocked m a = WriteLocked { runWriteLocked :: m a }
You can’t perform that action at this time.
0 commit comments