BSD-3-Clause licensed by Moritz Schulte
This version can be pinned in stack with:throttle-io-stream-,1862

Module documentation for

Depends on 5 packages(full list with versions):

throttle-io-stream Hackage version Stackage version Build Status


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.