unliftio-0.2.23.0: The MonadUnliftIO typeclass for unlifting monads to IO (batteries included)
Safe Haskell Safe-Inferred
Language Haskell2010

UnliftIO.MVar

Description

Unlifted Control.Concurrent.MVar .

Since: 0.1.0.0

Synopsis

Documentation

data MVar a Source #

An MVar (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.

Instances

Instances details
NFData1 MVar

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> MVar a -> () Source #

Eq ( MVar a)

Since: base-4.1.0.0

Instance details

Defined in GHC.MVar

NFData ( MVar a)

NOTE : Only strict in the reference and not the referenced value.

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: MVar a -> () Source #

newMVar :: MonadIO m => a -> m ( MVar a) Source #

Lifted newMVar .

Since: 0.1.0.0

takeMVar :: MonadIO m => MVar a -> m a Source #

Lifted takeMVar .

Since: 0.1.0.0

putMVar :: MonadIO m => MVar a -> a -> m () Source #

Lifted putMVar .

Since: 0.1.0.0

readMVar :: MonadIO m => MVar a -> m a Source #

Lifted readMVar .

Since: 0.1.0.0

swapMVar :: MonadIO m => MVar a -> a -> m a Source #

Lifted swapMVar .

Since: 0.1.0.0

tryPutMVar :: MonadIO m => MVar a -> a -> m Bool Source #

Lifted tryPutMVar .

Since: 0.1.0.0

withMVar :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b Source #

Unlifted withMVar .

Since: 0.1.0.0

withMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m b) -> m b Source #

Unlifted withMVarMasked .

Since: 0.1.0.0

modifyMVar :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b Source #

Unlifted modifyMVar .

Since: 0.1.0.0

modifyMVar_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m () Source #

Unlifted modifyMVar_ .

Since: 0.1.0.0

modifyMVarMasked :: MonadUnliftIO m => MVar a -> (a -> m (a, b)) -> m b Source #

Unlifted modifyMVarMasked .

Since: 0.1.0.0

modifyMVarMasked_ :: MonadUnliftIO m => MVar a -> (a -> m a) -> m () Source #

Unlifted modifyMVarMasked_ .

Since: 0.1.0.0

mkWeakMVar :: MonadUnliftIO m => MVar a -> m () -> m ( Weak ( MVar a)) Source #

Unlifted mkWeakMVar .

Since: 0.1.0.0