stm-chans: Additional types of channels for STM.

[ bsd3, concurrency, library ] [ Propose Tags ]

Additional types of channels for STM.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.1.0, 1.2.0, 1.2.0.1, 1.2.0.2, 1.2.0.3, 1.3.0, 1.3.1, 2.0.0, 2.1.0, 3.0.0, 3.0.0.2, 3.0.0.3, 3.0.0.4, 3.0.0.5, 3.0.0.6, 3.0.0.9
Change log CHANGELOG
Dependencies base (>=4.1 && <5), stm (>=2.4) [details]
License BSD-3-Clause
Copyright 2011–2023 wren romano
Author wren gayle romano, Thomas DuBuisson
Maintainer wren@cpan.org
Category Concurrency
Home page https://wrengr.org/software/hackage.html
Bug tracker https://github.com/wrengr/stm-chans/issues
Source repo head: git clone https://github.com/wrengr/stm-chans.git
Uploaded by WrenRomano at 2023-03-19T22:35:45Z
Distributions Arch:3.0.0.9, Debian:3.0.0.4, Fedora:3.0.0.9, FreeBSD:3.0.0.4, LTSHaskell:3.0.0.9, NixOS:3.0.0.9, Stackage:3.0.0.9, openSUSE:3.0.0.9
Reverse Dependencies 71 direct, 3866 indirect [details]
Downloads 94639 total (229 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-03-19 [all 1 reports]

Readme for stm-chans-3.0.0.9

[back to package description]

stm-chans

Hackage version Build Status Dependencies

This package offers a collection of channel types, similar to Control.Concurrent.STM.{TChan,TQueue} but with additional features. In particular we offer the following data types:

  • Control.Concurrent.STM.TBChan: Bounded FIFO channels. When the channel is full, writers will block/retry. This ensures that the writers do not get too far ahead of the readers, which helps to make sure that memory and cpu resources are used responsibly.
  • Control.Concurrent.STM.TMChan: Closeable FIFO channels.
  • Control.Concurrent.STM.TMQueue: Closeable FIFO queues. Like TChan (Maybe a) but with a monotonicity guarantee that once Nothing is returned all future reads will be Nothing as well.
  • Control.Concurrent.STM.TBMChan: Bounded Closeable FIFO channels.
  • Control.Concurrent.STM.TBMQueue: Bounded Closeable FIFO queues. Combines the capabilities of TBChan and TMChan.

Install

In general, this is a simple package and should be easy to install. It does require GHC however, because it relies on the Control.Concurrent.STM.TChan type which (for some unknown reason) is GHC-only. With the cabal-install program you can just do:

$> cabal install stm-chans