About

Metadata

  • Last updated , by WrenRomano
  • License BSD-3-Clause
  • Categories Systems Programming, Concurrency
  • Maintained by: wren@cpan.org

  • Lottery factor: 1

Links

Installation

Tested Compilers

  1. 9.12.1
  2. 9.10.1
  3. 9.8.2
  4. 9.6.5
  5. 9.4.8
  6. 9.2.4
  7. 9.0.1
  8. 8.10.3
  9. 8.8.4
  10. 8.6.5
  11. 8.4.4
  12. 8.2.2
  13. 8.0.2

Readme

stm-chans

CI Status Hackage version Stackage LTS version Stackage Nightly version

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