Popularity
4.1
Stable
Activity
0.0
Stable
6
4
0
Monthly Downloads: 6
Programming language: Haskell
License: MIT License
Tags:
Concurrency
io-throttle alternatives and similar packages
Based on the "Concurrency" category.
Alternatively, view io-throttle alternatives based on common mentions on social networks and blogs.
-
haxl
A Haskell library that simplifies access to remote data, such as databases or web-based services. -
unagi-chan
A haskell library implementing fast and scalable concurrent queues for x86, with a Chan-like API -
timers
Simple package that implements timers. Both "one-shot" and "repeating" timers are implemented.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
Do you think we are missing an alternative of io-throttle or a related project?
README
io-throttle
Limit the number of tasks started per second. The throttle function will run all actions concurrently but only starting a certain number per second. It will wait for all tasks and return the results in a list.
Example
module Main where
import Control.Concurrent
import Control.Concurrent.Throttle
import Control.Monad
main :: IO ()
main = do results <- throttle 5 tasks
putStrLn $ "------ RESULTS: ------"
forM_ results print
where
tasks = map performTask ([1..100] :: [Int])
performTask i = do putStrLn $ "started task: " ++ show i
threadDelay $ i * 10000
putStrLn $ "task finished: " ++ show i
return i