streaming-commons 0.1.15 → 0.1.15.1
raw patch · 3 files changed
+19/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Data/Streaming/Process.hs +13/−3
- streaming-commons.cabal +2/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.1.15.1++* Catch exceptions thrown by `waitForProcess`+ ## 0.1.15 * Use `NO_DELAY1 for TCP client connections [#27](https://github.com/fpco/streaming-commons/issues/27)
Data/Streaming/Process.hs view
@@ -31,11 +31,12 @@ ) where import Control.Applicative ((<$>), (<*>))-import Control.Concurrent (forkIO)+import Control.Concurrent (forkIOWithUnmask) import Control.Concurrent.STM (STM, TMVar, atomically, newEmptyTMVar, putTMVar, readTMVar)-import Control.Exception (Exception, throwIO)+import Control.Exception (Exception, throwIO, try, throw,+ SomeException) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Maybe (fromMaybe) import Data.Streaming.Process.Internal@@ -157,7 +158,16 @@ } ec <- atomically newEmptyTMVar- _ <- forkIO $ waitForProcess ph >>= atomically . putTMVar ec+ -- Apparently waitForProcess can throw an exception itself when+ -- delegate_ctlc is True, so to avoid this TMVar from being left empty, we+ -- capture any exceptions and store them as an impure exception in the+ -- TMVar+ _ <- forkIOWithUnmask $ \_unmask -> try (waitForProcess ph)+ >>= atomically+ . putTMVar ec+ . either+ (throw :: SomeException -> a)+ id (,,,) <$> getStdin stdinH
streaming-commons.cabal view
@@ -1,5 +1,5 @@ name: streaming-commons-version: 0.1.15+version: 0.1.15.1 synopsis: Common lower-level functions needed by various streaming data libraries description: Provides low-dependency functionality commonly needed by various streaming data libraries, such as conduit and pipes. homepage: https://github.com/fpco/streaming-commons@@ -49,6 +49,7 @@ build-depends: base >= 4.4 && < 5 , array+ , async , blaze-builder >= 0.3 && < 0.5 , bytestring , directory