HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleconcurrency-1.11.0.3Haskell2010

Control.Concurrent.Classy.STM.TChan

Transactional channels

Deviations: TChan as defined here does not have an Eq instance, this is because the MonadSTM TVar type does not have an Eq constraint. Furthermore, the newTChanIO and newBroadcastTChanIO functions are not provided.

Contents
  1. TChans
  2. Construction
  3. Reading and writing
Synopsis

TChans

Construction

valuedupTChan :: MonadSTM stm => TChan stm a -> stm (TChan stm a)

Duplicate a TChan: 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.

Reading and writing