monad-loops-stm-0.4: Monadic loops for STM
Control.Monad.Loops.STM
Synopsis
atomLoop :: STM a -> IO ()Source
forever and atomically rolled into one.
forever
atomically
forkAtomLoop :: STM a -> IO ThreadIdSource
atomLoop with a forkIO
atomLoop
forkIO
waitFor :: (a -> Bool) -> STM a -> STM aSource
retry until the given condition is true of the given value. Then return the value that satisfied the condition.
retry
waitForTrue :: STM Bool -> STM ()Source
retry until the given value is True.
waitForJust :: STM (Maybe a) -> STM aSource
retry until the given value is Just _, returning the contained value.
Just
waitForEvent :: (a -> Bool) -> TChan a -> STM aSource
waitFor a value satisfying a condition to come out of a TChan, reading and discarding everything else. Returns the winner.
waitFor
TChan