Popularity
3.1
Declining
Activity
0.0
Stable
2
4
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.
-
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of batch or a related project?
README
batch
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]