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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulescheduler-2.0.1.0Haskell2010

Control.Scheduler.Internal

  • 16 values
  • Packagescheduler-2.0.1.0
  • Exports16
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceInternal.hs
valuewithSchedulerInternal
  1. :: Comp

    Computation strategy

  2. -> (Jobs IO a -> (WorkerId -> IO a) -> IO ())

    How to schedule work

  3. -> (JQueue IO a -> IO [a])

    How to collect results

  4. -> (Scheduler RealWorld a -> IO b)

    Action that will be scheduling all the work.

  5. -> IO (Results a)
#
valuetrivialScheduler_ :: Scheduler s ()
#

The most basic scheduler that simply runs the task instead of scheduling it. Early termination requests are bluntly ignored.

valuescheduleJobs_ :: MonadIO m => Jobs m a -> (WorkerId -> m b) -> m ()
#

Ignores the result of computation, thus avoiding some overhead.

valuescheduleJobsWith
  1. :: MonadIO m
  2. => ((b -> m ()) -> WorkerId -> m ()) -> m (Job m a)
  3. -> Jobs m a
  4. -> WorkerId -> m b
  5. -> m ()
#
valueresultsToList :: Results a -> [a]
#

Conversion to a list. Elements are expected to be in the orignal LIFO order, so calling reverse is still necessary for getting the results in FIFO order.

valuetraverse_ :: (Applicative f, Foldable t) => (a -> f ()) -> t a -> f ()
#

This is generally a faster way to traverse while ignoring the result rather than using mapM_.

valuesafeBracketOnError
  1. :: MonadUnliftIO m
  2. => m a
  3. -> a -> m b
  4. -> a -> m c
  5. -> m c
#