packages feed

stm-extras 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+4/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

src/Control/Concurrent/STM/TMVar/Extras.hs view
@@ -7,13 +7,16 @@ -- Returns what was in the TMVar (if exists) forceSwapTMVar :: TMVar a -> a -> STM (Maybe a) forceSwapTMVar v a = (Just <$> swapTMVar v a) `orElse` (const Nothing <$> putTMVar v a)+{-# INLINABLE forceSwapTMVar #-}  -- | Block until TMVar is empty. -- The argument a is used to try to put into TMVar, but is taken out again in the same -- transaction waitTillEmptyTMVar :: TMVar a -> a -> STM () waitTillEmptyTMVar v a = putTMVar v a >> takeTMVar v >> pure ()+{-# INLINABLE waitTillEmptyTMVar #-}  -- | Block until TMVar is full. waitTillFullTMVar :: TMVar a -> STM () waitTillFullTMVar v = takeTMVar v >>= putTMVar v+{-# INLINABLE waitTillFullTMVar #-}
stm-extras.cabal view
@@ -1,5 +1,5 @@ name:                stm-extras-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Extra STM functions description:         Please see README.md homepage:            https://github.com/louispan/stm-extras#readme