Source codeContentsIndex
Control.Concurrent.TxEvent.STM
Portabilitynon-portable (requires TxEvent)
Stabilityexperimental
Maintainermfluet@acm.org
Contents
The STM monad and basic operations
TVars
Miscellaneous
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
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
data TVar a
newTVar :: a -> IO (TVar a)
readTVar :: TVar a -> STM a
writeTVar :: TVar a -> a -> STM ()
stmToEvt :: STM a -> Evt a
The STM monad and basic operations
data STM a
show/hide Instances
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
show/hide Instances
Eq (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