- 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
. TaskPool
s begin stopped, use startQueue
to start.
- A
QueueConfigurationRecord
for the backingQueue
. A typical value isfair_queue_configuration
. - The allowed number of threads that can access the
TaskPool
simultaneously. - 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
.