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

Modulecabal-install-3.12.1.0Haskell2010

Distribution.Client.JobControl

A job control concurrency abstraction

  • 3 types
  • 13 values
datadata JobControl (m :: Type -> Type) a
#

A simple concurrency abstraction. Jobs can be spawned and can complete in any order. This allows both serial and parallel implementations.

Make a JobControl that executes all jobs serially and in order. It only executes jobs on demand when they are collected, not eagerly.

Cancelling will cancel all jobs that have not been collected yet.

Make a JobControl that eagerly executes jobs in parallel, with a given maximum degree of parallelism.

Cancelling will cancel jobs that have not yet begun executing, but jobs that have already been executed or are currently executing cannot be cancelled.

valuecancelJobs :: JobControl m a -> m ()
#

Try to cancel any outstanding but not-yet-started jobs. Call remainingJobs after this to find out if any jobs are left (ie could not be cancelled).

valuecleanupJobControl :: JobControl m a -> m ()
#

cleanup any resources created by the JobControl, intended to be used as the finaliser for bracket.

newtypenewtype Lock
#