stm-chans 1.2.0.1 → 1.2.0.2
raw patch · 10 files changed
+77/−20 lines, 10 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- AUTHORS +9/−0
- LICENSE +1/−1
- README +20/−0
- VERSION +19/−0
- src/Control/Concurrent/STM/TBChan.hs +1/−1
- src/Control/Concurrent/STM/TBMChan.hs +1/−1
- src/Control/Concurrent/STM/TChan/Compat.hs +3/−1
- src/Control/Concurrent/STM/TMChan.hs +5/−6
- src/Control/Concurrent/STM/TVar/Compat.hs +3/−1
- stm-chans.cabal +15/−9
+ AUTHORS view
@@ -0,0 +1,9 @@+=== Haskell stm-chans package AUTHORS/THANKS file ===++The stm-chans package was written (predominantly) by wren ng thornton+and is released under the terms in the LICENSE file. Some important+improvements to TBChan and TBMChan were contributed by Thomas+DuBuisson, incorporating parts of his bounded-tchan package. These+improvements reduce contention between readers and writers, improving+throughput by 2--3 times when producers and consumers are running+in separate OS threads.
LICENSE view
@@ -1,6 +1,6 @@ === stm-chans license === -Copyright (c) 2011, wren ng thornton.+Copyright (c) 2011, 2012, wren ng thornton. ALL RIGHTS RESERVED. Redistribution and use in source and binary forms, with or without
+ README view
@@ -0,0 +1,20 @@+stm-chans+=========++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++Or if you don't have cabal-install, then you can use the Cabal+library:++ $> runhaskell Setup.hs configure+ $> runhaskell Setup.hs build+ $> runhaskell Setup.hs test+ $> runhaskell Setup.hs haddock --hyperlink-source+ $> runhaskell Setup.hs install++----------------------------------------------------------- fin.
+ VERSION view
@@ -0,0 +1,19 @@+1.2.0.2 (2012-02-12):+ - Documentation fix for Control.Concurrent.STM.TMChan.writeTMChan+1.2.0.1 (2011-05-07):+ - Moved old TBChan,TBMChan implementations to ./test/bench/+1.2.0 (2011-05-07):+ - Various optimizations.+ - Switched to using 2 TVars in TBChan and TBMChan, reducing+ contention between readers and writers and improving throughput+ considerably (when multiple OS threads are used).+ - Control.Concurrent.STM.TBChan: added estimateFreeSlotsTBChan,+ freeSlotsTBChan+ - Control.Concurrent.STM.TBMChan: added estimateFreeSlotsTBMChan,+ freeSlotsTBMChan+1.1.0 (2011-04-05):+ - Control.Concurrent.STM.TBChan: added tryWriteTBChan+ - Control.Concurrent.STM.TBMChan: added tryWriteTBMChan+1.0.0 (2011-04-03):+ - Initial version forked from Posta-IPC.+ - Added tryRead* and tryPeek* functions for the various channels.
src/Control/Concurrent/STM/TBChan.hs view
@@ -4,7 +4,7 @@ -- 2011.04.06 -- | -- Module : Control.Concurrent.STM.TBChan--- Copyright : Copyright (c) 2011 wren ng thornton+-- Copyright : Copyright (c) 2011--2012 wren ng thornton -- License : BSD -- Maintainer : wren@community.haskell.org -- Stability : experimental
src/Control/Concurrent/STM/TBMChan.hs view
@@ -4,7 +4,7 @@ -- 2011.04.06 -- | -- Module : Control.Concurrent.STM.TBMChan--- Copyright : Copyright (c) 2011 wren ng thornton+-- Copyright : Copyright (c) 2011--2012 wren ng thornton -- License : BSD -- Maintainer : wren@community.haskell.org -- Stability : experimental
src/Control/Concurrent/STM/TChan/Compat.hs view
@@ -4,7 +4,7 @@ -- 2011.04.03 -- | -- Module : Control.Concurrent.STM.TChan.Compat--- Copyright : Copyright (c) 2011 wren ng thornton+-- Copyright : Copyright (c) 2011--2012 wren ng thornton -- License : BSD -- Maintainer : wren@community.haskell.org -- Stability : experimental@@ -40,6 +40,8 @@ import Control.Concurrent.STM.TChan -- N.B., GHC only -- BUG: What version will these really be added?+-- <http://hackage.haskell.org/trac/ghc/ticket/5104>+-- <http://www.haskell.org/pipermail/cvs-libraries/2011-April/012914.html> #if ! (MIN_VERSION_stm(9,0,0)) import Control.Applicative ((<$>)) import Control.Monad.STM (STM)
src/Control/Concurrent/STM/TMChan.hs view
@@ -1,10 +1,10 @@ {-# OPTIONS_GHC -Wall -fwarn-tabs #-} {-# LANGUAGE CPP, DeriveDataTypeable #-} ------------------------------------------------------------------- 2011.04.06+-- 2012.02.12 -- | -- Module : Control.Concurrent.STM.TMChan--- Copyright : Copyright (c) 2011 wren ng thornton+-- Copyright : Copyright (c) 2011--2012 wren ng thornton -- License : BSD -- Maintainer : wren@community.haskell.org -- Stability : experimental@@ -175,10 +175,9 @@ -} --- | Write a value to a @TMChan@, retrying if the channel is full.--- If the channel is closed then the value is silently discarded.--- Use 'isClosedTMChan' to determine if the channel is closed before--- writing, as needed.+-- | Write a value to a @TMChan@. If the channel is closed then the+-- value is silently discarded. Use 'isClosedTMChan' to determine+-- if the channel is closed before writing, as needed. writeTMChan :: TMChan a -> a -> STM () writeTMChan (TMChan closed chan) x = do b <- readTVar closed
src/Control/Concurrent/STM/TVar/Compat.hs view
@@ -4,7 +4,7 @@ -- 2011.04.03 -- | -- Module : Control.Concurrent.STM.TVar.Compat--- Copyright : Copyright (c) 2011 wren ng thornton+-- Copyright : Copyright (c) 2011--2012 wren ng thornton -- License : BSD -- Maintainer : wren@community.haskell.org -- Stability : experimental@@ -42,6 +42,8 @@ #endif -- BUG: What version will these really be added?+-- <http://hackage.haskell.org/trac/ghc/ticket/5104>+-- <http://www.haskell.org/pipermail/cvs-libraries/2011-April/012914.html> #if ! (MIN_VERSION_stm(9,0,0)) import Control.Concurrent.STM (STM) #endif
stm-chans.cabal view
@@ -1,25 +1,31 @@ ------------------------------------------------------------------- wren ng thornton <wren@community.haskell.org> ~ 2011.05.07+-- wren ng thornton <wren@community.haskell.org> ~ 2012.02.08 ---------------------------------------------------------------- -Name: stm-chans-Version: 1.2.0.1--- Source-Repository requires version 1.6+-- By and large Cabal >=1.2 is fine; but >= 1.6 gives tested-with:+-- and source-repository:. Cabal-Version: >= 1.6 -- We need a custom build in order to define __HADDOCK__ Build-Type: Custom++Name: stm-chans+Version: 1.2.0.2 Stability: experimental-Copyright: Copyright (c) 2011 wren ng thornton-License: BSD3-License-File: LICENSE+Homepage: http://code.haskell.org/~wren/ Author: wren ng thornton, Thomas DuBuisson Maintainer: wren@community.haskell.org-Homepage: http://code.haskell.org/~wren/+Copyright: Copyright (c) 2011--2012 wren ng thornton+License: BSD3+License-File: LICENSE+ Category: Concurrency Synopsis: Additional types of channels for STM. Description: Additional types of channels for STM. -Tested-With: GHC == 6.12.1, GHC == 6.12.3+Tested-With:+ GHC == 6.12.1, GHC == 6.12.3+Extra-source-files:+ AUTHORS, README, VERSION Source-Repository head Type: darcs Location: http://community.haskell.org/~wren/stm-chans