happstack-util-6.0.3: Web framework

Happstack.Util.Concurrent

Synopsis

Documentation

forkEverSt :: (t -> IO t) -> t -> IO ThreadIdSource

Equivalent to a composition of fork and foreverSt

foreverSt :: Monad m => (t -> m t) -> t -> m bSource

Similar to forever but with an explicit state parameter threaded through the computation.

forkEver :: IO a -> IO ThreadIdSource

Equivalent to a composition of fork and forever

writeChanRight :: Chan (Either a b) -> b -> IO ()Source

Lifts the argument with Right before writing it into the chan

writeChanLeft :: Chan (Either a b) -> a -> IO ()Source

Lifts the argument with Left before writing it into the chan

fork_ :: IO a -> IO ()Source

Fork that throws away the ThreadId

fork :: IO a -> IO ThreadIdSource

Fork a new thread.

registerResetAction :: IO () -> IO ()Source

Register an action to be run when ghci is restarted.

reset :: IO ()Source

Reset state

forever :: IO a -> IO aSource

A version of forever that will gracefully catch IO exceptions and continue executing the provided action.

sleep :: Int -> IO ()Source

Sleep N seconds