serokell-util-0.1.4.0: General-purpose functions by Serokell

Safe HaskellNone
LanguageHaskell2010

Serokell.Util.Concurrent

Description

Convenient versions of some functions from Concurrent

Synopsis

Documentation

threadDelay :: (MonadIO m, TimeUnit unit) => unit -> m () Source #

Convenient version of Control.Concurrent.threadDelay which takes any time-unit and operates in any MonadIO

modifyTVarS :: TVar s -> StateT s STM a -> STM a Source #

Atomically modifies given TVar, associating state of given StateT with TVar entry. TODO: maybe generalize to any container and monad? Define as operator?