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

Safe HaskellNone
LanguageHaskell2010

Transient.Indeterminism

Description

Synopsis

Documentation

choose :: [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, slower in some cases

chooseStream :: [a] -> TransIO (StreamData a) Source #

transmit the end of stream

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 :: Monoid a => Int -> 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.

burst :: Int -> TransIO a -> TransIO (StreamData a) Source #

insert SDone response every time there is a timeout since the last response