throttle-io-stream: Throttler between arbitrary IO producer and consumer functions

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This packages provides functionality for throttling IO using general IO callbacks. The throttling depends on a provided configuration. The supported throttling modes are producer throttling, consumer throttling or producer & consumer throttling.


[Skip to Readme]

Properties

Versions 0.2.0.0, 0.2.0.0, 0.2.0.1
Change log None available
Dependencies async, base (>=4.7 && <5), clock, stm, stm-chans [details]
License BSD-3-Clause
Copyright (c) 2017 Moritz Schulte
Author Moritz Schulte
Maintainer mtesseract@silverratio.net
Category Concurrency
Home page https://github.com/mtesseract/io-throttle#readme
Bug tracker https://github.com/mtesseract/io-throttle/issues
Source repo head: git clone https://github.com/mtesseract/io-throttle
Uploaded by mtesseract at 2017-09-03T21:04:25Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for throttle-io-stream-0.2.0.0

[back to package description]

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.