auto-update: Efficiently run periodic, on-demand actions

[ control, library, mit ] [ Propose Tags ]

API docs and the README are available at http://www.stackage.org/package/auto-update.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.1.1.4, 0.1.1.5, 0.1.2, 0.1.2.1, 0.1.2.2, 0.1.3, 0.1.3.1, 0.1.4, 0.1.4.1, 0.1.5, 0.1.6
Change log ChangeLog.md
Dependencies base (>=4 && <5) [details]
License MIT
Author Michael Snoyman
Maintainer michael@snoyman.com
Category Control
Home page https://github.com/yesodweb/wai
Uploaded by MichaelSnoyman at 2014-12-21T10:41:31Z
Distributions Arch:0.1.6, Debian:0.1.6, Fedora:0.1.6, FreeBSD:0.1.2.2, LTSHaskell:0.1.6, NixOS:0.1.6, Stackage:0.1.6, openSUSE:0.1.6
Reverse Dependencies 28 direct, 3907 indirect [details]
Downloads 102533 total (264 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for auto-update-0.1.2.1

[back to package description]

auto-update

A common problem is the desire to have an action run at a scheduled interval, but only if it is needed. For example, instead of having every web request result in a new 1getCurrentTime1 call, we'd like to have a single worker thread run every second, updating an 1IORef1. However, if the request frequency is less than once per second, this is a pessimization, and worse, kills idle GC.

This library allows you to define actions which will either be performed by a dedicated thread or, in times of low volume, will be executed by the calling thread.

For original use case, see yesod-scaffold issue #15.