| |||||||||||||||||||||
| |||||||||||||||||||||
| |||||||||||||||||||||
Description | |||||||||||||||||||||
Software Transactional Memory This library provides software transactional memory implemented on top of the Control.Concurrent.TxEvent library. The major functional differences (other than efficiency) between this implementation and that of Control.Concurrent.STM are (1) that orElse is unbaised, (2) that newTVar returns an IO action, rather than a STM action, and (3) that an uncaught exception effectively behaves as retry. | |||||||||||||||||||||
Synopsis | |||||||||||||||||||||
| |||||||||||||||||||||
The STM monad and basic operations | |||||||||||||||||||||
data STM a | |||||||||||||||||||||
| |||||||||||||||||||||
atomically :: STM a -> IO a | |||||||||||||||||||||
retry :: STM a | |||||||||||||||||||||
orElse :: STM a -> STM a -> STM a | |||||||||||||||||||||
check :: Bool -> STM a | |||||||||||||||||||||
catchSTM :: STM a -> (Exception -> STM a) -> STM a | |||||||||||||||||||||
TVars | |||||||||||||||||||||
data TVar a | |||||||||||||||||||||
| |||||||||||||||||||||
newTVar :: a -> IO (TVar a) | |||||||||||||||||||||
readTVar :: TVar a -> STM a | |||||||||||||||||||||
writeTVar :: TVar a -> a -> STM () | |||||||||||||||||||||
Miscellaneous | |||||||||||||||||||||
stmToEvt :: STM a -> Evt a | |||||||||||||||||||||
Perfectly safe. | |||||||||||||||||||||
Produced by Haddock version 0.7 |