concurrency 1.2.2.0 → 1.2.3.0
raw patch · 3 files changed
+53/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.Concurrent.Classy.Async: withAsyncN :: MonadConc m => String -> m a -> (Async m a -> m b) -> m b
+ Control.Concurrent.Classy.Async: withAsyncOnN :: MonadConc m => String -> Int -> m a -> (Async m a -> m b) -> m b
+ Control.Concurrent.Classy.Async: withAsyncOnWithUnmaskN :: MonadConc m => String -> Int -> ((forall x. m x -> m x) -> m a) -> (Async m a -> m b) -> m b
+ Control.Concurrent.Classy.Async: withAsyncWithUnmaskN :: MonadConc m => String -> ((forall x. m x -> m x) -> m a) -> (Async m a -> m b) -> m b
Files
- CHANGELOG.markdown +18/−0
- Control/Concurrent/Classy/Async.hs +33/−0
- concurrency.cabal +2/−2
CHANGELOG.markdown view
@@ -7,6 +7,24 @@ *de facto* standard Haskell versioning scheme. +1.2.3.0+-------++- **Date** 2017-11-30+- **Git tag** [concurrency-1.2.3.0][]+- **Hackage** https://hackage.haskell.org/package/concurrency-1.2.3.0++### Control.Concurrent.Classy.Async++- New named-thread variants of the `withAsync*` functions: `withAsyncN`, `withAsyncOnN`,+ `withAsyncWithUnmaskN`, and `withAsyncOnWithUnmaskN` (#148).++[concurrency-1.2.3.0]: https://github.com/barrucadu/dejafu/releases/tag/concurrency-1.2.3.0+++---------------------------------------------------------------------------------------------------++ 1.2.2.0 -------
Control/Concurrent/Classy/Async.hs view
@@ -42,9 +42,13 @@ -- * Spawning with automatic 'cancel'ation , withAsync+ , withAsyncN , withAsyncOn+ , withAsyncOnN , withAsyncWithUnmask+ , withAsyncWithUnmaskN , withAsyncOnWithUnmask+ , withAsyncOnWithUnmaskN -- * Querying 'Async's , wait, waitSTM@@ -255,23 +259,52 @@ withAsync :: MonadConc m => m a -> (Async m a -> m b) -> m b withAsync = withAsyncUsing fork +-- | Like 'withAsync' but using a named thread for better debugging+-- information.+--+-- @since 1.2.3.0+withAsyncN :: MonadConc m => String -> m a -> (Async m a -> m b) -> m b+withAsyncN name = withAsyncUsing (forkN name)+ -- | Like 'withAsync' but uses 'forkOn' internally. -- -- @since 1.1.1.0 withAsyncOn :: MonadConc m => Int -> m a -> (Async m a -> m b) -> m b withAsyncOn = withAsyncUsing . forkOn +-- | Like 'withAsyncOn' but using a named thread for better debugging+-- information.+--+-- @since 1.2.3.0+withAsyncOnN :: MonadConc m => String -> Int -> m a -> (Async m a -> m b) -> m b+withAsyncOnN name i = withAsyncUsing (forkOnN name i)+ -- | Like 'withAsync' bit uses 'forkWithUnmask' internally. -- -- @since 1.1.1.0 withAsyncWithUnmask :: MonadConc m => ((forall x. m x -> m x) -> m a) -> (Async m a -> m b) -> m b withAsyncWithUnmask = withAsyncUnmaskUsing forkWithUnmask +-- | Like 'withAsyncWithUnmask' but using a named thread for better+-- debugging information.+--+-- @since 1.2.3.0+withAsyncWithUnmaskN :: MonadConc m => String -> ((forall x. m x -> m x) -> m a) -> (Async m a -> m b) -> m b+withAsyncWithUnmaskN name = withAsyncUnmaskUsing (forkWithUnmaskN name)+ -- | Like 'withAsyncOn' bit uses 'forkOnWithUnmask' internally. -- -- @since 1.1.1.0 withAsyncOnWithUnmask :: MonadConc m => Int -> ((forall x. m x -> m x) -> m a) -> (Async m a -> m b) -> m b withAsyncOnWithUnmask i = withAsyncUnmaskUsing (forkOnWithUnmask i)++-- | Like 'withAsyncOnWithUnmask' but using a named thread for better+-- debugging information.+--+-- @since 1.2.3.0+withAsyncOnWithUnmaskN :: MonadConc m+ => String -> Int -> ((forall x. m x -> m x) -> m a) -> (Async m a -> m b) -> m b+withAsyncOnWithUnmaskN name i = withAsyncUnmaskUsing (forkOnWithUnmaskN name i) -- | Helper for 'withAsync' and 'withAsyncOn': fork a thread with the -- given forking function and kill it when the inner action completes.
concurrency.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: concurrency-version: 1.2.2.0+version: 1.2.3.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.2.0+ tag: concurrency-1.2.3.0 library exposed-modules: Control.Monad.Conc.Class