rolling-queue: Bounded channel for STM that discards old entries when full
This package provides a FIFO channel for STM supporting a size limit. When this limit is reached, older entries are discarded to make way for newer entries.
The motivation for this is logging. If log entries are written to a plain
TChan, the program will use a lot of memory if it produces log entries
faster than they can be processed. If log entries are written to a bounded
channel where writes block (e.g. the stm-chans package), the program may
deadlock if the log channel fills up. With Data.STM.RollingQueue, old
entries will be discarded instead.
Possible improvements (not available in Data.STM.RollingQueue) include:
Discard lower-priority entries first.
Discard every other entry, so some of the older entries will still be available.
Downloads
- rolling-queue-0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1 |
|---|---|
| Dependencies | base (>=4 && <5), stm [details] |
| License | BSD-3-Clause |
| Copyright | Copyright (c) Joseph Adams 2012 |
| Author | Joey Adams |
| Maintainer | joeyadams3.14159@gmail.com |
| Category | Data |
| Home page | https://github.com/joeyadams/haskell-rolling-queue |
| Source repo | head: git clone git://github.com/joeyadams/haskell-rolling-queue.git |
| Uploaded | by JoeyAdams at 2012-02-16T09:11:29Z |
| Distributions | NixOS:0.1 |
| Reverse Dependencies | 2 direct, 0 indirect [details] |
| Downloads | 1836 total (3 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] |