PrioritySync.Internal.TaskPool
Description
- data TaskPool p u
- schedule :: TaskPool p u -> p -> Schedule p (Constrained (TaskPoolConstraint u), Room (TaskPoolConstraint u))
- newTaskPool :: Ord p => QueueConfigurationRecord p -> Int -> u -> IO (TaskPool p u)
- simpleTaskPool :: Ord p => IO (TaskPool p ())
- poolRoom :: TaskPool p u -> Room (TaskPoolConstraint u)
- poolQueue :: TaskPool p u -> Queue p
- startQueue :: TaskPool p u -> STM ()
- stopQueue :: TaskPool p u -> STM ()
- isEmpty :: Ord p => TaskPool p u -> STM Bool
- waitUntilFinished :: Ord p => TaskPool p u -> IO ()
Documentation
schedule :: TaskPool p u -> p -> Schedule p (Constrained (TaskPoolConstraint u), Room (TaskPoolConstraint u))Source
A prioritized ClaimContext for a task pool.
newTaskPool :: Ord p => QueueConfigurationRecord p -> Int -> u -> IO (TaskPool p u)Source
Create a new TaskPool. TaskPools begin stopped, use startQueue to start.
- A
QueueConfigurationRecordfor the backingQueue. A typical value isfair_queue_configuration. - The allowed number of threads that can access the
TaskPoolsimultaneously. - The user data for the backing
Room. This can be().
Consider using simpleTaskPool if you have no special needs.
simpleTaskPool :: Ord p => IO (TaskPool p ())Source
Just create a new TaskPool. The task pool is constrained by the number of capabilities indicated by numCapabilities.