ANN stm-chans 2.1 / 3.0

wren ng thornton wren at
Thu May 30 20:43:39 CEST 2013

-- stm-chans 2.1 / 3.0

The stm-chans package offers a collection of channel types, similar to
Control.Concurrent.STM.{TChan,TQueue} but with additional features.

-- Changes (since 2.0.0)

By popular demand, the functions newBroadcastTMChan{,IO} have been 
added. However, these rely on newBroadcastTChan{,IO} which are only 
available in stm >= 2.4 and do not appear to be replicable using the 
public API of stm < 2.4. Thus, the minimum version of stm is now 2.4, 
which obviates all the compatibility modules.

Version 2.1.0 adds the new functions and issues deprecation warnings 
about using the compatibility modules. This version is just to help 
people transition. If you can use this version without warnings (i.e., 
you don't use the Compat modules directly) then you should be able to 
use version 3.0 as well.

Version 3.0 removes the compatibility modules.

-- Long description

In particular stm-chans offers 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.

-- Links




Haddock (Darcs version):

Live well,

More information about the Libraries mailing list