Safe Haskell | None |
---|
- module Control.Concurrent.Bag.Task
- newTaskBag :: BufferType -> [TaskIO r (Maybe r)] -> IO [r]
- newEvalBag :: BufferType -> [r] -> IO [r]
- newInterruptingBag :: BufferType -> [Interruptible r] -> IO [r]
- newInterruptibleBag :: BufferType -> [Interruptible r] -> IO [r]
- data BufferType
Documentation
module Control.Concurrent.Bag.Task
:: BufferType | |
-> [TaskIO r (Maybe r)] | list of initial tasks |
-> IO [r] |
newEvalBag :: BufferType -> [r] -> IO [r]Source
Like newTaskBag
, but it takes a list of expressions that will be
evaluated to weak head normal form using seq
.
__WARNING__: This does not evaluate to normal form, but only to weak head normal form.
newInterruptingBag :: BufferType -> [Interruptible r] -> IO [r]Source
Similar to newTaskBag
, but interrupts the tasks in certain intervals.
Using a TChan
as buffer, this ensures
completeness: all tasks that have a result will get their time to evaluate
it. Note, that calculations, that do no memory allocation, cannot be
interrupted.
newInterruptibleBag :: BufferType -> [Interruptible r] -> IO [r]Source
data BufferType Source