summaryrefslogtreecommitdiff
path: root/src/Command/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-11-22 22:04:05 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-11-22 22:04:05 +0100
commit5b19d70e6bb70f951e6a7c1670c54db640eaa1d0 (patch)
tree22069238b511c06ae8b58efa1cfeae0b2f65e9a5 /src/Command/Run.hs
parent90a4709f4b6cafcd6be9461046a26ad6fb641869 (diff)
Make sure to write the final status update before terminating
Diffstat (limited to 'src/Command/Run.hs')
-rw-r--r--src/Command/Run.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Command/Run.hs b/src/Command/Run.hs
index ddc166a..bd60bae 100644
--- a/src/Command/Run.hs
+++ b/src/Command/Run.hs
@@ -333,8 +333,10 @@ cmdRun (RunCommand RunOptions {..} args) = do
threadCount <- newTVarIO (0 :: Int)
let changeCount f = atomically $ do
writeTVar threadCount . f =<< readTVar threadCount
- let waitForJobs = atomically $ do
- flip when retry . (0 <) =<< readTVar threadCount
+ let waitForJobs = do
+ atomically $ do
+ flip when retry . (0 <) =<< readTVar threadCount
+ waitForRemainingTasks mngr
let loop _ Nothing = return ()
loop names (Just ( [], next )) = do