Hoogle Search
Within LTS Haskell 24.36 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
asMutVar :: MutVar s a -> MutVar s aclassy-prelude-yesod ClassyPrelude.Yesod Since 0.2.0
atomicModifyMutVar :: PrimMonad m => MutVar (PrimState m) a -> (a -> (a, b)) -> m bclassy-prelude-yesod ClassyPrelude.Yesod Atomically mutate the contents of a MutVar. This function is useful for using MutVar in a safe way in a multithreaded program. If you only have one MutVar, then using atomicModifyMutVar to access and modify it will prevent race conditions. Extending the atomicity to multiple MutVars is problematic, so if you need to do anything more complicated, using MVar instead is a good idea. atomicModifyMutVar does not apply the function strictly. This means if a program calls atomicModifyMutVar many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. To avoid this problem, use atomicModifyMutVar' instead.
atomicModifyMutVar' :: PrimMonad m => MutVar (PrimState m) a -> (a -> (a, b)) -> m bclassy-prelude-yesod ClassyPrelude.Yesod Strict version of atomicModifyMutVar. This forces both the value stored in the MutVar as well as the value returned.
mkWeakTVar :: MonadUnliftIO m => TVar a -> m () -> m (Weak (TVar a))classy-prelude-yesod ClassyPrelude.Yesod Lifted version of mkWeakTVar
modifyMutVar :: PrimMonad m => MutVar (PrimState m) a -> (a -> a) -> m ()classy-prelude-yesod ClassyPrelude.Yesod Mutate the contents of a MutVar. modifyMutVar does not apply the function strictly. This means if a program calls modifyMutVar many times, but seldom uses the value, thunks will pile up in memory resulting in a space leak. To avoid this problem, use modifyMutVar' instead.
modifyMutVar' :: PrimMonad m => MutVar (PrimState m) a -> (a -> a) -> m ()classy-prelude-yesod ClassyPrelude.Yesod Strict version of modifyMutVar.
modifyTVar :: TVar a -> (a -> a) -> STM ()classy-prelude-yesod ClassyPrelude.Yesod Mutate the contents of a TVar. N.B., this version is non-strict.
modifyTVar' :: TVar a -> (a -> a) -> STM ()classy-prelude-yesod ClassyPrelude.Yesod Strict version of modifyTVar.
mutVarFromIORef :: IORef a -> MutVar RealWorld aclassy-prelude-yesod ClassyPrelude.Yesod mutVarFromSTRef :: STRef s a -> MutVar s aclassy-prelude-yesod ClassyPrelude.Yesod