happstack-util-6.0.2: Web framework

Happstack.Util.Concurrent

Synopsis

Documentation

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

Equivalent to a composition of fork and foreverSt

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

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

forkEver :: IO a -> IO ThreadId

Equivalent to a composition of fork and forever

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

Lifts the argument with Right before writing it into the chan

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

Lifts the argument with Left before writing it into the chan

fork_ :: IO a -> IO ()

Fork that throws away the ThreadId

fork :: IO a -> IO ThreadId

Fork a new thread.

registerResetAction :: IO () -> IO ()

Register an action to be run when ghci is restarted.

reset :: IO ()

Reset state

forever :: IO a -> IO a

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

sleep :: Int -> IO ()

Sleep N seconds