hedgehog-1.5: Release with confidence.

Safe Haskell | None
Language | Haskell2010

Hedgehog.Internal.Queue

Synopsis

- newtype TaskIndex = TaskIndex Int
- newtype TasksRemaining = TasksRemaining Int
- runTasks :: WorkerCount -> [a] -> (TasksRemaining -> TaskIndex -> a -> IO b) -> (b -> IO ()) -> (b -> IO ()) -> (b -> IO c) -> IO [c]
- finalizeTask :: MonadIO m => MVar (TaskIndex, Map TaskIndex (IO ())) -> TaskIndex -> IO () -> m ()
- runActiveFinalizers :: MonadIO m => MVar (TaskIndex, Map TaskIndex (IO ())) -> m ()
- dequeueMVar :: MVar [(TaskIndex, a)] -> (TasksRemaining -> TaskIndex -> a -> IO b) -> IO (Maybe (TaskIndex, b))
- updateNumCapabilities :: WorkerCount -> IO ()

# Documentation

newtype TaskIndex Source #

Constructors

TaskIndex Int |

#### Instances

Instances details

Enum TaskIndex Source # |

Instance details

Defined in Hedgehog.Internal.Queue

Methods

succ :: TaskIndex -> TaskIndex Source #

pred :: TaskIndex -> TaskIndex Source #

toEnum :: Int -> TaskIndex Source #

fromEnum :: TaskIndex -> Int Source #

enumFrom :: TaskIndex -> [TaskIndex] Source #

enumFromThen :: TaskIndex -> TaskIndex -> [TaskIndex] Source #

enumFromTo :: TaskIndex -> TaskIndex -> [TaskIndex] Source #

enumFromThenTo :: TaskIndex -> TaskIndex -> TaskIndex -> [TaskIndex] Source #

Num TaskIndex Source # |
Instance details Defined in Hedgehog.Internal.Queue Methods (+) :: TaskIndex -> TaskIndex -> TaskIndex Source # (-) :: TaskIndex -> TaskIndex -> TaskIndex Source # (*) :: TaskIndex -> TaskIndex -> TaskIndex Source # negate :: TaskIndex -> TaskIndex Source # abs :: TaskIndex -> TaskIndex Source # signum :: TaskIndex -> TaskIndex Source # fromInteger :: Integer -> TaskIndex Source #
Eq TaskIndex Source # |
Instance details Defined in Hedgehog.Internal.Queue Methods (==) :: TaskIndex -> TaskIndex -> Bool Source # (/=) :: TaskIndex -> TaskIndex -> Bool Source #
Ord TaskIndex Source # |

Instance details

Defined in Hedgehog.Internal.Queue

Methods

compare :: TaskIndex -> TaskIndex -> Ordering Source #

(<) :: TaskIndex -> TaskIndex -> Bool Source #

(<=) :: TaskIndex -> TaskIndex -> Bool Source #

(>) :: TaskIndex -> TaskIndex -> Bool Source #

(>=) :: TaskIndex -> TaskIndex -> Bool Source #

max :: TaskIndex -> TaskIndex -> TaskIndex Source #

min :: TaskIndex -> TaskIndex -> TaskIndex Source #

newtype TasksRemaining Source #

Constructors

TasksRemaining Int |

runTasks :: WorkerCount -> [a] -> (TasksRemaining -> TaskIndex -> a -> IO b) -> (b -> IO ()) -> (b -> IO ()) -> (b -> IO c) -> IO [c] Source #

finalizeTask :: MonadIO m => MVar (TaskIndex, Map TaskIndex (IO ())) -> TaskIndex -> IO () -> m () Source #

runActiveFinalizers :: MonadIO m => MVar (TaskIndex, Map TaskIndex (IO ())) -> m () Source #

dequeueMVar :: MVar [(TaskIndex, a)] -> (TasksRemaining -> TaskIndex -> a -> IO b) -> IO (Maybe (TaskIndex, b)) Source #

updateNumCapabilities :: WorkerCount -> IO () Source #

Update the number of capabilities but never set it lower than it already is.