Popularity
2.3
Growing
Activity
0.0
Stable
1
2
0
Monthly Downloads: 4
Programming language: Haskell
License: MIT License
Tags:
Concurrency
Latest version: v0.1.0
sharedio alternatives and similar packages
Based on the "Concurrency" category.
Alternatively, view sharedio 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 sharedio or a related project?
README
haskell-sharedio
Allows "bundling" or "throttling" of concurrent IO to perform computation only once.
Useful in situations where concurrency can be expensive, such as file system scans (where concurrent execution usually returns the same result but introduces much disk seeking overhead).
Example
import Control.Concurrent.SharedIO (SharedIO, newSharedIO, withSharedIO)
-- A webserver that lists directory contents, using
-- SharedIO to bundle clients fanatically hitting refresh.
-- Without this, the file seeking would slow the server to a crawl.
main = do
fileScanSharedIO <- newSharedIO
runWebserver (handleRequest fileScanSharedIO)
handleRequest :: SharedIO -> IO [FilePath]
handleRequest fileScanSharedIO = do
withSharedIO fileScanSharedIO (getDirectoryContents "largefolder")