concurrency 1.2.0.0 → 1.2.1.0
raw patch · 5 files changed
+49/−5 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.Concurrent.Classy.Async: asyncN :: MonadConc m => String -> m a -> m (Async m a)
+ Control.Concurrent.Classy.Async: asyncOnN :: MonadConc m => String -> Int -> m a -> m (Async m a)
+ Control.Concurrent.Classy.Async: asyncOnWithUnmaskN :: MonadConc m => String -> Int -> ((forall b. m b -> m b) -> m a) -> m (Async m a)
+ Control.Concurrent.Classy.Async: asyncWithUnmaskN :: MonadConc m => String -> ((forall b. m b -> m b) -> m a) -> m (Async m a)
Files
- CHANGELOG.markdown +18/−0
- Control/Concurrent/Classy/Async.hs +28/−1
- Control/Concurrent/Classy/MVar.hs +1/−1
- Control/Monad/STM/Class.hs +0/−1
- concurrency.cabal +2/−2
CHANGELOG.markdown view
@@ -7,6 +7,24 @@ *de facto* standard Haskell versioning scheme. +1.2.1.0+-------++- **Date** 2017-10-02+- **Git tag** [concurrency-1.2.1.0][]+- **Hackage** https://hackage.haskell.org/package/concurrency-1.2.1.0++### Control.Concurrent.Classy.Async++- New named-thread variants of the `async*` functions: `asyncN`, `asyncOnN`, `asyncWithUnmaskN`, and+ `asyncOnWithUnmaskN` (#125).++[concurrency-1.2.1.0]: https://github.com/barrucadu/dejafu/releases/tag/concurrency-1.2.1.0+++---------------------------------------------------------------------------------------------------++ 1.2.0.0 -------
Control/Concurrent/Classy/Async.hs view
@@ -32,9 +32,13 @@ -- * Spawning , async+ , asyncN , asyncOn+ , asyncOnN , asyncWithUnmask+ , asyncWithUnmaskN , asyncOnWithUnmask+ , asyncOnWithUnmaskN -- * Spawning with automatic 'cancel'ation , withAsync@@ -88,7 +92,6 @@ import Control.Monad.Conc.Class import Control.Monad.STM.Class import Data.Foldable (foldMap)-import Data.Traversable #if MIN_VERSION_base(4,9,0) import Data.Semigroup (Semigroup(..))@@ -179,23 +182,47 @@ async :: MonadConc m => m a -> m (Async m a) async = asyncUsing fork +-- | Like 'async', but using a named thread for better debugging information.+--+-- @since 1.2.1.0+asyncN :: MonadConc m => String -> m a -> m (Async m a)+asyncN name = asyncUsing (forkN name)+ -- | Like 'async' but using 'forkOn' internally. -- -- @since 1.1.1.0 asyncOn :: MonadConc m => Int -> m a -> m (Async m a) asyncOn = asyncUsing . forkOn +-- | Like 'asyncOn' but using a named thread for better debugging information.+--+-- @since 1.2.1.0+asyncOnN :: MonadConc m => String -> Int -> m a -> m (Async m a)+asyncOnN name = asyncUsing . (forkOnN name)+ -- | Like 'async' but using 'forkWithUnmask' internally. -- -- @since 1.1.1.0 asyncWithUnmask :: MonadConc m => ((forall b. m b -> m b) -> m a) -> m (Async m a) asyncWithUnmask = asyncUnmaskUsing forkWithUnmask +-- | Like 'asyncWithUnmask' but using a named thread for better debugging information.+--+-- @since 1.2.1.0+asyncWithUnmaskN :: MonadConc m => String -> ((forall b. m b -> m b) -> m a) -> m (Async m a)+asyncWithUnmaskN name = asyncUnmaskUsing (forkWithUnmaskN name)+ -- | Like 'asyncOn' but using 'forkOnWithUnmask' internally. -- -- @since 1.1.1.0 asyncOnWithUnmask :: MonadConc m => Int -> ((forall b. m b -> m b) -> m a) -> m (Async m a) asyncOnWithUnmask i = asyncUnmaskUsing (forkOnWithUnmask i)++-- | Like 'asyncOnWithUnmask' but using a named thread for better debugging information.+--+-- @since 1.2.1.0+asyncOnWithUnmaskN :: MonadConc m => String -> Int -> ((forall b. m b -> m b) -> m a) -> m (Async m a)+asyncOnWithUnmaskN name i = asyncUnmaskUsing (forkOnWithUnmaskN name i) -- | Fork a thread with the given forking function asyncUsing :: MonadConc m => (m () -> m (ThreadId m)) -> m a -> m (Async m a)
Control/Concurrent/Classy/MVar.hs view
@@ -48,7 +48,7 @@ , modifyMVarMasked ) where -import Control.Monad.Catch (mask_, onException)+import Control.Monad.Catch (onException) import Control.Monad.Conc.Class import Data.Maybe (isJust)
Control/Monad/STM/Class.hs view
@@ -34,7 +34,6 @@ import Control.Monad (MonadPlus(..), unless) import Control.Monad.Reader (ReaderT) import Control.Monad.Trans (lift)-import Control.Monad.Trans.Control (MonadTransControl, StT, liftWith) import Control.Monad.Trans.Identity (IdentityT) import qualified Control.Concurrent.STM as STM
concurrency.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: concurrency-version: 1.2.0.0+version: 1.2.1.0 synopsis: Typeclasses, functions, and data types for concurrency and STM. description:@@ -32,7 +32,7 @@ source-repository this type: git location: https://github.com/barrucadu/dejafu.git- tag: concurrency-1.2.0.0+ tag: concurrency-1.2.1.0 library exposed-modules: Control.Monad.Conc.Class