BSD-3-Clause licensed by Moritz Schulte
Maintained by [email protected]
This version can be pinned in stack with:throttle-io-stream-0.2.0.1@sha256:4ccc82920f43ad9ec2babad4bb0f48ce4c328973e56aba9e59a7e0d991c557cf,1862

Module documentation for 0.2.0.1

throttle-io-stream Hackage version Stackage version Build Status

About

This packages provides throttling functionality for arbitrary IO producers and consumers. The core function exported is the following:

throttle :: ThrottleConf a     -- ^ Throttling configuration
         -> IO (Maybe a)       -- ^ Input callback
         -> (Maybe a -> IO ()) -- ^ Output callback
         -> IO (Async ())      -- ^ Returns an async handler for this
                               -- throttling process

This will spawn asynchronous operations that

  1. consume data using the provided input callback and write it into an internal buffering queue and

  2. produce data from the buffering queue using the provided consumer callback.