HORIZON HASKELLDocslts/ghc-10.0.xc7d136e2026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · c7d136e · 2026-10-12

Modulelifted-base-0.2.3.12

Control.Concurrent.Lifted

  • 5 types
  • 50 values
datadata Chan a
#

Chan is an abstract type representing an unbounded FIFO channel.

Instances1Eq
  • Eq (Chan a)Defined in base-4.23.0.0 · Control.Concurrent.Chan
newtypenewtype QSem
#

QSem is a quantity semaphore in which the resource is acquired and released in units of one. It provides guaranteed FIFO ordering for satisfying blocked waitQSem calls.

The pattern

bracket_ waitQSem signalQSem (...)

is safe; it never loses a unit of the resource.

datadata QSemN
#

QSemN is a quantity semaphore in which the resource is acquired and released in arbitrary amounts. It provides guaranteed FIFO ordering for satisfying blocked waitQSemN calls.

The pattern

bracket_ (waitQSemN n) (signalQSemN n) (...)

is safe; it never loses any of the resource.

datadata ThreadId
#

A ThreadId is an abstract type representing a handle to a thread. ThreadId is an instance of Eq, Ord and Show, where the Ord instance implements an arbitrary total ordering over ThreadIds. The Show instance lets you convert an arbitrary-valued ThreadId to string form; showing a ThreadId value is occasionally useful when debugging or diagnosing the behaviour of a concurrent program.

Note: in GHC, if you have a ThreadId, you essentially have a pointer to the thread itself. This means the thread itself can't be garbage collected until you drop the ThreadId. This misfeature would be difficult to correct while continuing to support threadStatus.

Instances3Eq, Ord, Show
  • Eq ThreadIdDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.Sync
  • Ord ThreadIdDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.Sync
  • Show ThreadIdDefined in ghc-internal-10.0.0 · GHC.Internal.Conc.Sync
datadata MVar a
#

An MVar (pronounced "em-var") is a synchronising variable, used for communication between concurrent threads. It can be thought of as a box, which may be empty or full.

Instances1Eq
  • Eq (MVar a)Defined in ghc-internal-10.0.0 · GHC.Internal.MVar

    Compares the underlying pointers.