File: README.md

package info (click to toggle)
haskell-auto-update 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 92 kB
  • sloc: haskell: 237; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
## 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 `getCurrentTime` call, we'd like to have a single worker thread
run every second, updating an `IORef`. 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](https://github.com/yesodweb/yesod-scaffold/pull/15).