From 5b19d70e6bb70f951e6a7c1670c54db640eaa1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 22 Nov 2025 22:04:05 +0100 Subject: Make sure to write the final status update before terminating --- src/Command/Run.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Command') 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 -- cgit v1.2.3