concurrent-extra 0.7 → 0.7.0.1
raw patch · 10 files changed
+63/−33 lines, 10 filesdep ~basedep ~test-frameworkPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, test-framework
API changes (from Hackage documentation)
Files
- Control/Concurrent/Broadcast.hs +1/−1
- Control/Concurrent/Event.hs +1/−1
- Control/Concurrent/Lock.hs +1/−1
- Control/Concurrent/RLock.hs +1/−1
- Control/Concurrent/ReadWriteLock.hs +2/−3
- Control/Concurrent/ReadWriteVar.hs +18/−17
- Control/Concurrent/STM/Lock.hs +1/−1
- LICENSE +1/−1
- README.markdown +26/−0
- concurrent-extra.cabal +11/−7
Control/Concurrent/Broadcast.hs view
@@ -3,7 +3,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.Broadcast--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>
Control/Concurrent/Event.hs view
@@ -7,7 +7,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.Event--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>
Control/Concurrent/Lock.hs view
@@ -3,7 +3,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.Lock--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>
Control/Concurrent/RLock.hs view
@@ -8,7 +8,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.RLock--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>
Control/Concurrent/ReadWriteLock.hs view
@@ -8,7 +8,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.ReadWriteLock--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>@@ -73,13 +73,12 @@ import Control.Exception ( bracket_, onException ) import Control.Monad ( return, return, (>>), when ) import Data.Bool ( Bool(False, True) )-import Data.Char ( String ) import Data.Eq ( Eq, (==) ) import Data.Function ( ($), on ) import Data.Int ( Int ) import Data.Maybe ( Maybe(Nothing, Just) ) import Data.Typeable ( Typeable )-import Prelude ( ($!), succ, pred, error )+import Prelude ( String, ($!), succ, pred, error ) import System.IO ( IO ) #if __GLASGOW_HASKELL__ < 700
Control/Concurrent/ReadWriteVar.hs view
@@ -8,7 +8,7 @@ ------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.ReadWriteVar--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : 2010—2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>@@ -18,9 +18,10 @@ -- can be read and used by multiple threads at the same time. Concurrent -- computations inside a 'with' \"block\" observe the same value. ----- Observing and changing the contents of an 'RWVar' are mutually exclusive. The--- 'with' function will block if 'modify' is active and vice-versa. Furthermore--- 'with' is fully sequential and will also block on concurrent calls of 'with'.+-- Observing and changing the contents of an 'RWVar' are mutually+-- exclusive. The 'with' function will block if 'modify' is active and+-- vice-versa. Furthermore 'with' is fully sequential and will also+-- block on concurrent calls of 'modify'. -- -- The following are guaranteed deadlocks: --@@ -62,23 +63,23 @@ ------------------------------------------------------------------------------- -- from base:-import Control.Applicative ( liftA2 )-import Control.Monad ( (>>=) )-import Data.Bool ( Bool(..) )-import Data.Eq ( Eq, (==) )-import Data.Function ( ($), on )-import Data.Functor ( fmap )-import Data.Maybe ( Maybe(..), isJust )-import Data.IORef ( IORef, newIORef, readIORef )-import Data.Typeable ( Typeable )-import System.IO ( IO )+import Control.Applicative ( liftA2 )+import Control.Monad ( (>>=) )+import Data.Bool ( Bool(..) )+import Data.Eq ( Eq, (==) )+import Data.Function ( ($), on )+import Data.Functor ( fmap )+import Data.Maybe ( Maybe(..), isJust )+import Data.IORef ( IORef, newIORef, readIORef )+import Data.Typeable ( Typeable )+import System.IO ( IO ) #ifdef __HADDOCK__-import Data.Function ( const )-import Prelude ( undefined )+import Data.Function ( const )+import Prelude ( undefined ) #endif -- from base-unicode-symbols:-import Data.Function.Unicode ( (∘) )+import Data.Function.Unicode ( (∘) ) -- from concurrent-extra (this package): import Control.Concurrent.ReadWriteLock ( RWLock )
Control/Concurrent/STM/Lock.hs view
@@ -3,7 +3,7 @@ -------------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.STM.Lock--- Copyright : (c) 2010 Bas van Dijk & Roel van Dijk+-- Copyright : (c) 2010-2011 Bas van Dijk & Roel van Dijk -- License : BSD3 (see the file LICENSE) -- Maintainer : Bas van Dijk <v.dijk.bas@gmail.com> -- , Roel van Dijk <vandijk.roel@gmail.com>
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2010 Bas van Dijk & Roel van Dijk+Copyright (c) 2010-2011 Bas van Dijk & Roel van Dijk All rights reserved.
+ README.markdown view
@@ -0,0 +1,26 @@+The `concurrent-extra` package offers among other things the following+selection of synchronisation primitives:++* `Broadcast`: Wake multiple threads by broadcasting a value.++* `Event`: Wake multiple threads by signalling an event.++* `Lock`: Enforce exclusive access to a resource. Also known as a+ binary semaphore or mutex. The package additionally provides an+ alternative that works in the `STM` monad.++* `RLock`: A lock which can be acquired multiple times by the same+ thread. Also known as a reentrant mutex.++* `ReadWriteLock`: Multiple-reader, single-writer locks. Used to+ protect shared resources which may be concurrently read, but only+ sequentially written.++* `ReadWriteVar`: Concurrent read, sequential write variables.++Please consult the API documentation of the individual modules for+more detailed information.++This package was inspired by the concurrency libraries of+[Java](http://download.oracle.com/javase/6/docs/technotes/guides/concurrency/index.html)+and [Python](http://docs.python.org/py3k/library/threading.html).
concurrent-extra.cabal view
@@ -1,5 +1,5 @@ name: concurrent-extra-version: 0.7+version: 0.7.0.1 cabal-version: >= 1.8 build-type: Custom stability: experimental@@ -7,9 +7,11 @@ Roel van Dijk <vandijk.roel@gmail.com> maintainer: Bas van Dijk <v.dijk.bas@gmail.com> Roel van Dijk <vandijk.roel@gmail.com>-copyright: (c) 2010 Bas van Dijk & Roel van Dijk+copyright: (c) 2010-2011 Bas van Dijk & Roel van Dijk license: BSD3 license-file: LICENSE+homepage: https://github.com/basvandijk/concurrent-extra/+bug-reports: https://github.com/basvandijk/concurrent-extra/issues category: Concurrency synopsis: Extra concurrency primitives description:@@ -39,14 +41,16 @@ This package was inspired by the concurrency libraries of Java and Python. +extra-source-files: README.markdown+ source-repository head- Type: darcs- Location: http://code.haskell.org/concurrent-extra+ Type: git+ Location: git://github.com/basvandijk/concurrent-extra.git ------------------------------------------------------------------------------- library- build-depends: base >= 3 && < 4.4+ build-depends: base >= 3 && < 4.5 , base-unicode-symbols >= 0.1.1 && < 0.3 , stm >= 2.1.2.1 && < 2.3 , unbounded-delays >= 0.1 && < 0.2@@ -76,12 +80,12 @@ ghc-options: -Wall - build-depends: base >= 3 && < 4.4+ build-depends: base >= 3 && < 4.5 , base-unicode-symbols >= 0.1.1 && < 0.3 , stm >= 2.1.2.1 && < 2.3 , unbounded-delays >= 0.1 && < 0.2 , HUnit >= 1.2.2 && < 1.3- , test-framework >= 0.2.4 && < 0.4+ , test-framework >= 0.2.4 && < 0.5 , test-framework-hunit >= 0.2.4 && < 0.3 -------------------------------------------------------------------------------