stm-split-0.0.2: TMVars, TVars and TChans with distinguished input and output side

Safe HaskellSafe
LanguageHaskell98

Control.Concurrent.STM.Split.MVar

Synopsis

Documentation

data T dir a Source #

Instances

C T Source # 

Methods

newIO :: IO (T In a, T Out a) Source #

new :: STM (T In a, T Out a) Source #

read :: T Out a -> STM a Source #

write :: T In a -> a -> STM () Source #

type In = T In Source #

type Out = T Out Source #

newIO :: a -> IO (In a, Out a) Source #

new :: a -> STM (In a, Out a) Source #

take :: Out a -> STM a Source #

tryTake :: Out a -> STM (Maybe a) Source #

put :: In a -> a -> STM () Source #

tryPut :: In a -> a -> STM Bool Source #

write :: In a -> a -> STM () Source #

Write value to TMVar and overwrite existing content. It never blocks. Please note, that this function is different from the generic write, which blocks on TMVars.