A TMVar is like an MVar or a mVar, but using transactional
memory. As transactions are atomic, this makes dealing with
multiple TMVars easier than wrangling multiple mVars.
Moduleconcurrency-1.11.0.3Haskell2010
Control.Concurrent.Classy.STM.TMVar
Transactional MVars, for use with MonadSTM.
Deviations: TMVar as defined here does not have an Eq
instance, this is because the MonadSTM TVar type does not have
an Eq constraint. Furthermore, the newTMVarIO,
newEmptyTMVarIO, and mkWeakTMVar functions are not provided.
Contents
Synopsis
- newtype TMVar
- value newTMVar
- value newTMVarN
- value newEmptyTMVar
- value newEmptyTMVarN
- value takeTMVar
- value putTMVar
- value readTMVar
- value tryTakeTMVar
- value tryPutTMVar
- value tryReadTMVar
- value isEmptyTMVar
- value swapTMVar
- Packageconcurrency-1.11.0.3
- Exports13
- LanguageHaskell2010
- LicenceMIT
- SourceTMVar.hs
TMVars
Create a TMVar containing the given value.
Create a new empty TMVar.
Check if a TMVar is empty or not.