stm-promise-0.0.1.1: Simple STM Promises for IO computations and external processes

Safe HaskellSafe-Inferred

Control.Concurrent.STM.Promise.Workers

Description

Evaluating promises in parallel

Synopsis

Documentation

workers :: Maybe Int -> Int -> [Promise a] -> IO ()Source

Evaluate these promises on n processors, maybe using a timeout in microseconds.

worker :: Maybe Int -> TChan (Promise a) -> IO ()Source

Evaluates a channel of promises, maybe using a timeout in microseconds. Stops when the channel is empty.

evaluatePromise :: Maybe Int -> Promise a -> IO ()Source

Evaluates a single promise (in the calling thread), maybe using a timeout in microseconds.