HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleunliftio-0.2.25.1Haskell2010

UnliftIO.Concurrent

Unlifted Control.Concurrent.

This module is not reexported by UnliftIO, use it only if UnliftIO.Async is not enough.

  • 1 type
  • 22 values

Concurrent Haskell

1 declaration
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.

Instances5Eq, Ord, Show, NFData, Hashable
  • Eq ThreadIdDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Ord ThreadIdDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • Show ThreadIdDefined in ghc-internal-9.1003.0 · GHC.Internal.Conc.Sync
  • NFData ThreadIdDefined in deepseq-1.5.0.0 · Control.DeepSeq
  • Hashable ThreadIdDefined in hashable-1.4.7.0 · Data.Hashable.Class

Basic concurrency operations

7 declarations
valueforkWithUnmask
  1. :: MonadUnliftIO m
  2. => (forall a. m a -> m a) -> m ()
  3. -> m ThreadId
#

Deprecated. forkWithUnmask has been renamed to forkIOWithUnmask

Please use forkIOWithUnmask instead. This function has been deprecated in release 0.2.11 and will be removed in the next major release.

Threads with affinity

Scheduling

1 declaration

Waiting

Communication abstractions

0 declarations

Bound Threads

5 declarations

Weak references to ThreadIds

1 declaration