packages feed

core-program 0.5.0.1 → 0.5.0.2

raw patch · 2 files changed

+10/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

core-program.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           core-program-version:        0.5.0.1+version:        0.5.0.2 synopsis:       Opinionated Haskell Interoperability description:    A library to help build command-line programs, both tools and                 longer-running daemons.
lib/Core/Program/Execute.hs view
@@ -401,7 +401,7 @@ loopForever action v out queue = do     -- block waiting for an item     possibleItems <- atomically $ do-        cycleOverQueue []+        cycleOverQueue 0 []      case possibleItems of         -- we're done!@@ -419,7 +419,12 @@                 )             loopForever action v out queue   where-    cycleOverQueue items =+    cycleOverQueue !count items =+        if count >= (1024 :: Int)+            then pure (Just items)+            else cycleOverQueue' count items++    cycleOverQueue' !count items =         case items of             [] -> do                 possibleItem <- readTQueue queue -- blocks@@ -428,7 +433,7 @@                     Nothing -> pure Nothing                     -- otherwise start accumulating                     Just item -> do-                        cycleOverQueue (item : [])+                        cycleOverQueue 1 (item : [])             _ -> do                 pending <- tryReadTQueue queue -- doesn't block                 case pending of@@ -446,7 +451,7 @@                                 pure (Just items)                             -- continue accumulating!                             Just item -> do-                                cycleOverQueue (item : items)+                                cycleOverQueue (count + 1) (item : items)      reportStatus start num = do         level <- readMVar v