Popularity
2.3
Declining
Activity
0.0
Stable
2
2
0

Monthly Downloads: 9
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Data    
Latest version: v0.1.0.0

batch alternatives and similar packages

Based on the "Data" category.
Alternatively, view batch alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of batch or a related project?

Add another 'Data' Package

README

batch

CircleCI

Simplify queuing up data and processing it in batch.

import Control.Batch
import Control.Concurrent.STM
import Control.Monad

example :: IO ()
example =
  do outVar <- atomically $ newTVar []
     let cfg =
             Batch
             { b_runEveryItems = Just 5
             , b_runAfterTimeout = Nothing
             , b_maxQueueLength = Nothing
             , b_runBatch =
                     \x -> atomically $ modifyTVar' outVar (++x)
             }
     withBatchRunner cfg $ \hdl ->
         do replicateM_ 5 $ bh_enqueue hdl True
            out <-
                atomically $
                do x <- readTVar outVar
                   when (length x /= 5) retry
                   pure x
            out `shouldBe` [True, True, True, True, True]