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

Modulestm-2.5.3.1Haskell2010

Control.Concurrent.STM.TQueue

A TQueue is like a TChan, with two important differences:

  • it has faster throughput than both TChan and Chan (although the costs are amortised, so the cost of individual operations can vary a lot).

  • it does not provide equivalents of the dupTChan and cloneTChan operations.

The implementation is based on the traditional purely-functional queue representation that uses two lists to obtain amortised O(1) enqueue and dequeue operations.

Contents
  1. TQueue
Synopsis
  • Packagestm-2.5.3.1
  • Exports11
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTQueue.hs

TQueue

datadata TQueue a

TQueue is an abstract type representing an unbounded FIFO channel.

Instances1Eq
  • Eq (TQueue a)Defined in stm-2.5.3.1 · Control.Concurrent.STM.TQueue
valuepeekTQueue :: TQueue a -> STM a

Get the next value from the TQueue without removing it, retrying if the channel is empty.