packages feed

concurrent-barrier 0.1 → 0.1.1

raw patch · 2 files changed

+21/−35 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Control.Concurrent.Barrier: type Barrier = IO ()
- Control.Concurrent.Barrier: barrier :: Int -> IO (IO ())
+ Control.Concurrent.Barrier: barrier :: Int -> IO Barrier
- Control.Concurrent.Barrier: latchBarrier :: Int -> IO (IO ())
+ Control.Concurrent.Barrier: latchBarrier :: Int -> IO Barrier

Files

Control/Concurrent/Barrier.hs view
@@ -1,13 +1,17 @@ {-# LANGUAGE DoAndIfThenElse #-} module Control.Concurrent.Barrier-    ( barrier+    ( Barrier++    , barrier     , latchBarrier     ) where  import Control.Monad (forM_) import Control.Concurrent.MVar -barrier' :: (Int -> Int) -> Int -> IO (IO ())+type Barrier = IO ()++barrier' :: (Int -> Int) -> Int -> IO Barrier barrier' reset count = do   b <- newMVar (count, [])   return $ do@@ -31,13 +35,15 @@ -- >    forkIO $ b >> putStrLn "2"  -- blocked -- >    forkIO $ b >> putStrLn "3"  -- all three threads run barrier :: Int -- ^ count - number of threads required before barrier is opened-        -> IO (IO ())+        -> IO Barrier barrier = barrier' id+{-# INLINE barrier #-}  -- | Latching barrier.  This is the same as 'barrier', except once the -- barrier has opened (the requisite number of threads has reached -- it), it remains open, allowing all subsequent threads through -- unblocked. latchBarrier :: Int -- ^ count - number of threads required before barrier is opened-             -> IO (IO ())+             -> IO Barrier latchBarrier = barrier' (const 0)+{-# INLINE latchBarrier #-}
concurrent-barrier.cabal view
@@ -3,47 +3,27 @@ -- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr. -- The name of the package. Name:                concurrent-barrier---- The package version. See the Haskell package versioning policy--- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for--- standards guiding when and how versions should be incremented.-Version:             0.1---- A short (one-line) description of the package.+Version:             0.1.1 Synopsis:            Simple thread barriers---- A longer description of the package.-Description: A very simple package providing thread barriers.---- URL for the project homepage or repository.+Description:+	A very simple package providing thread barriers. Homepage:            https://github.com/jsgf/concurrent-barrier---- The license under which the package is released. License:             BSD3---- The file containing the license text. License-file:        LICENSE---- The package author(s). Author:              Jeremy Fitzhardinge---- An email address to which users can send suggestions, bug reports,--- and patches. Maintainer:          jeremy@goop.org---- A copyright notice.--- Copyright:           - Category:            Concurrency- Build-type:          Simple+Cabal-version:       >=1.6 --- Extra files to be distributed with the package, such as examples or--- a README.--- Extra-source-files:  +source-repository head+  type:     git+  location: https://github.com/jsgf/concurrent-barrier.git --- Constraint on the version of Cabal needed to build this package.-Cabal-version:       >=1.2+source-repository this+  type:     git+  location: https://github.com/jsgf/concurrent-barrier.git+  tag:      v0.1.1  Library   -- Modules exported by the library.