Portability | non-portable (concurrency) |
---|---|
Stability | experimental |
Maintainer | libraries@haskell.org |
Unbounded channels.
The Chan
type
Operations
dupChan :: Chan a -> IO (Chan a)Source
Duplicate a Chan
: the duplicate channel begins empty, but data written to
either channel from then on will be available from both. Hence this creates
a kind of broadcast channel, where data written by anyone is seen by
everyone else.
unGetChan :: Chan a -> a -> IO ()Source
Put a data item back onto a channel, where it will be the next item read.
Stream interface
getChanContents :: Chan a -> IO [a]Source
Return a lazy list representing the contents of the supplied
Chan
, much like System.IO.hGetContents
.