diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-04-01 20:57:51 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-04-01 20:57:51 +0200 |
| commit | 007261536b8b5daf1e3cac24eeeb160c6d572c85 (patch) | |
| tree | 689a5c79aa1355cf40e03d6c0522d0f049253205 /src | |
| parent | 8615433b8ac8e161c36df9b18d551ceb3949ff1f (diff) | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/Job.hs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -259,8 +259,10 @@ runJobs mngr@JobManager {..} tout jobs rerun = do atomically $ writeTVar taskStatus status outputJobFinishedEvent tout taskJob status + handlerInstalled <- newEmptyMVar taskThread <- forkIO $ do handle handler $ do + putMVar handlerInstalled () res <- runExceptT $ do duplicate <- liftIO $ atomically $ do readTVar taskStatus >>= \case @@ -305,6 +307,7 @@ runJobs mngr@JobManager {..} tout jobs rerun = do atomically $ writeTVar taskStatus $ either id id res outputJobFinishedEvent tout taskJob $ either id id res + takeMVar handlerInstalled return Task {..} waitForRemainingTasks :: JobManager -> IO () |