| Copyright | (c) 2016 Michael Walker |
|---|---|
| License | MIT |
| Maintainer | Michael Walker <mike@barrucadu.co.uk> |
| Stability | stable |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Control.Concurrent.Classy.Chan
Description
Unbounded channels.
Deviations: Chan as defined here does not have an Eq
instance, this is because the MonadConc MVar type does not have
an Eq constraint. The deprecated unGetChan and isEmptyCHan
functions are not provided. Furthermore, the getChanContents
function is not provided as it needs unsafe I/O.
The Chan type
Operations
dupChan :: MonadConc m => Chan m a -> m (Chan m 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.