Popularity
2.8
Declining
Activity
0.0
Stable
1
4
0
Monthly Downloads: 7
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.
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 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")