transient-0.5.8: composing programs with multithreading, events and distributed computing

Safe HaskellNone
LanguageHaskell2010

Transient.Indeterminism

Description

Synopsis

Documentation

choose :: Show a => [a] -> TransIO a Source #

Converts a list of pure values into a transient task set. You can use the threads primitive to control the parallelism.

choose' :: [a] -> TransIO a Source #

Same as choose except that the threads combinator cannot be used, instead the parent thread's limit applies.

collect :: Int -> TransIO a -> TransIO [a] Source #

Collect the results of the first n tasks. Synchronizes concurrent tasks to collect the results safely and kills all the non-free threads before returning the results. Results are returned in the thread where collect is called.

collect' :: Int -> Int -> TransIO a -> TransIO [a] Source #

Like collect but with a timeout. When the timeout is zero it behaves exactly like collect. If the timeout (second parameter) is non-zero, collection stops after the timeout and the results collected till now are returned.

group :: Int -> TransIO a -> TransIO [a] Source #

Collect the results of a task set in groups of n elements.

groupByTime :: Integer -> TransIO a -> TransIO [a] Source #

Collect the results of a task set, grouping all results received within every time interval specified by the first parameter as diffUTCTime.