packages feed

unagi-chan 0.2.0.0 → 0.2.0.1

raw patch · 3 files changed

+23/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.markdown view
@@ -3,7 +3,12 @@ - support new criterion and GHC 7.8.3 - small performance improvement to boxed unagi -### 0.2+### 0.2.0.0  - implement a bounded variant (See issue #1) - address issue with stale tickets when running in GHCi++### 0.2.0.1++- conditionally use tryReadMVar (as before) when GHC >= 7.8.3+- set proper CPP flags when running tests
src/Control/Concurrent/Chan/Unagi/Bounded/Internal.hs view
@@ -23,7 +23,7 @@ import Control.Monad import Control.Applicative import Data.Bits-import Data.Maybe(fromMaybe)+import Data.Maybe(fromMaybe,isJust) import Data.Typeable(Typeable) import GHC.Exts(inline) @@ -455,16 +455,14 @@ tryWriterCheckin (WriterCheckpoint v) = do -- On GHC > 7.8 we have an atomic `tryReadMVar`.  On earlier GHC readMVar is -- take+put, creating a race condition; in this case we use take+tryPut--- ensuring the MVar stays full even if a reader's tryPut slips an () in:+-- ensuring the MVar stays full even if a reader's tryPut slips an () in.+-- HOWEVER, tryReadMVar is also buggy in GHC < 7.8.3+--   https://ghc.haskell.org/trac/ghc/ticket/9148     unblocked <- -#if __GLASGOW_HASKELL__ < 708-      tryTakeMVar v >>= maybe (return False) ((True <$) . tryPutMVar v)+#ifdef TRYREADMVAR+      isJust <$> tryReadMVar v #else       tryTakeMVar v >>= maybe (return False) ((True <$) . tryPutMVar v)-      -- This is what we really want, unfortunately (and unfortunately for the-      -- hours of my life I'll never get back) this is buggy in GHC < 7.8.3:-      --   https://ghc.haskell.org/trac/ghc/ticket/9148-    --isJust <$> tryReadMVar v #endif     -- make sure we can see the reader's segment creation once we unblock...     loadLoadBarrier
unagi-chan.cabal view
@@ -1,5 +1,5 @@ name:                unagi-chan-version:             0.2.0.0+version:             0.2.0.1  synopsis:            Fast and scalable concurrent queues for x86, with a Chan-like API @@ -61,6 +61,9 @@   if !arch(i386) && !arch(x86_64)     cpp-options: -DNOT_x86 +  -- tryReadMVar is only available and non-broken on ghc >= 7.8.3+  if impl(ghc >= 7.8.3)+    cpp-options: -DTRYREADMVAR    -- TODO --  - Do a benchmark of multiple queues running in parallel, to see if we are@@ -106,6 +109,13 @@                      , atomic-primops >= 0.6.0.5 && <= 0.6.0.6                      , containers   default-language:    Haskell2010+  +  -- These have to be copied from 'library' section too!+  if !arch(i386) && !arch(x86_64)+    cpp-options: -DNOT_x86+ +  if impl(ghc >= 7.8.3)+    cpp-options: -DTRYREADMVAR  -- compare benchmarks with Chan, TQueue, and (eventually) lockfree-queue? flag compare-benchmarks