HORIZON HASKELLDocslts/ghc-9.14.xb9228482026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · b922848 · 2026-10-12

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.