resourcet 1.2.4 → 1.2.4.1
raw patch · 3 files changed
+20/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +8/−0
- Control/Monad/Trans/Resource.hs +8/−0
- resourcet.cabal +4/−2
ChangeLog.md view
@@ -1,5 +1,13 @@ # ChangeLog for resourcet +## 1.2.4.1++* Document risk of using `forkIO` within a `ResourceT` [#441](https://github.com/snoyberg/conduit/pull/441)++## 1.2.4++* Add `allocate_` [#437](https://github.com/snoyberg/conduit/pull/437)+ ## 1.2.3 * Support `unliftio-core` 0.2.0.0
Control/Monad/Trans/Resource.hs view
@@ -265,6 +265,14 @@ -- -- This is defined as @resourceForkWith forkIO@. --+-- Note: Using regular 'forkIO' inside of a 'ResourceT' is inherently unsafe,+-- since the forked thread may try access the resources of the parent after they are cleaned up.+-- When you use 'resourceForkIO' or 'resourceForkWith', 'ResourceT' is made aware of the new thread, and will only cleanup resources when all threads finish.+-- Other concurrency mechanisms, like 'concurrently' or 'race', are safe to use.+--+-- If you encounter 'InvalidAccess' exceptions ("The mutable state is being accessed after cleanup"),+-- use of 'forkIO' is a possible culprit.+-- -- @since 0.3.0 resourceForkIO :: MonadUnliftIO m => ResourceT m () -> ResourceT m ThreadId resourceForkIO = resourceForkWith forkIO
resourcet.cabal view
@@ -1,5 +1,5 @@ Name: resourcet-Version: 1.2.4+Version: 1.2.4.1 Synopsis: Deterministic allocation and freeing of scarce resources. description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/resourcet>. License: BSD3@@ -8,11 +8,12 @@ Maintainer: michael@snoyman.com Category: Data, Conduit Build-type: Simple-Cabal-version: >=1.8+Cabal-version: >=1.10 Homepage: http://github.com/snoyberg/conduit extra-source-files: ChangeLog.md, README.md Library+ default-language: Haskell2010 Exposed-modules: Control.Monad.Trans.Resource Control.Monad.Trans.Resource.Internal Data.Acquire@@ -28,6 +29,7 @@ ghc-options: -Wall test-suite test+ default-language: Haskell2010 hs-source-dirs: test main-is: main.hs type: exitcode-stdio-1.0