gang-of-threads-3.1.0: Non-deterministic parallelism with bags

Safe HaskellNone

Control.Concurrent.Bag.ImplicitConcurrent

Synopsis

Documentation

newTaskBagSource

Arguments

:: 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.

data BufferType Source

Constructors

Queue 
Stack