Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- mapConcurrentlyBounded :: Traversable t => Int -> (a -> IO b) -> t a -> IO (t b)
- mapConcurrentlyBounded_ :: Traversable t => Int -> (a -> IO ()) -> t a -> IO ()
- mapConcurrentlyBatched :: (NFData b, Foldable t) => Int -> ([[b]] -> IO r) -> (a -> IO b) -> t a -> IO r
- mapConcurrentlyBatched_ :: Foldable t => Int -> (a -> IO ()) -> t a -> IO ()
- mapConcurrentlyChunks :: (NFData b, Foldable t) => Int -> ([[b]] -> IO r) -> (a -> IO b) -> t a -> IO r
- mapConcurrentlyChunks_ :: Foldable t => Int -> (a -> IO ()) -> t a -> IO ()
- mergeConcatAll :: [[a]] -> [a]
concurrent mapping
mapConcurrentlyBounded :: Traversable t => Int -> (a -> IO b) -> t a -> IO (t b) Source #
Span a green thread for each task, but only execute N tasks concurrently.
mapConcurrentlyBounded_ :: Traversable t => Int -> (a -> IO ()) -> t a -> IO () Source #
Span a green thread for each task, but only execute N tasks concurrently. Ignore the result
mapConcurrentlyBatched :: (NFData b, Foldable t) => Int -> ([[b]] -> IO r) -> (a -> IO b) -> t a -> IO r Source #
Span green threads to perform N (batch size) tasks in one thread and merge results using provided merge function
mapConcurrentlyBatched_ :: Foldable t => Int -> (a -> IO ()) -> t a -> IO () Source #
Span green threads to perform N (batch size) tasks in one thread and ignore results
mapConcurrentlyChunks :: (NFData b, Foldable t) => Int -> ([[b]] -> IO r) -> (a -> IO b) -> t a -> IO r Source #
Split input into N chunks with equal length and work on each chunk in a dedicated green thread. Then merge results using provided merge function
mapConcurrentlyChunks_ :: Foldable t => Int -> (a -> IO ()) -> t a -> IO () Source #
Split input into N chunks with equal length and work on each chunk in a dedicated green thread. Ignore results
merge strategies
mergeConcatAll :: [[a]] -> [a] Source #
Merge all chunks by combining to one list. (Equiv to join
)