hoare
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Concurrent.Channel.Endless

Description

Tools for connecting communicating sequential processes (threads) with endless channels.

Many useful programs have no end to their input—they run in a steady state until killed. This module provides the same utilities as Control.Concurrent.Channel (see those docs), but for standard STM types we know and love.

Documentation

class Channel (c :: Type -> Type) where Source #

Methods

readChannel :: c a -> STM a Source #

writeChannel :: c a -> a -> STM () Source #

Instances

Instances details
Channel TBQueue Source # 
Instance details

Defined in Control.Concurrent.Channel.Endless

Methods

readChannel :: TBQueue a -> STM a Source #

writeChannel :: TBQueue a -> a -> STM () Source #

Channel TMVar Source # 
Instance details

Defined in Control.Concurrent.Channel.Endless

Methods

readChannel :: TMVar a -> STM a Source #

writeChannel :: TMVar a -> a -> STM () Source #

evalWriteChannel :: (Channel c, NFData a) => c a -> a -> IO () Source #

consumeChannel :: Channel c => c a -> (a -> IO ()) -> IO () Source #

feedChannel :: Channel c => c a -> IO a -> IO () Source #

evalFeedChannel :: (Channel c, NFData a) => c a -> IO a -> IO () Source #

pipeline :: IO c -> (c -> IO x) -> (c -> IO y) -> IO (x, y) Source #

pipeline_ :: IO c -> (c -> IO x) -> (c -> IO y) -> IO () Source #