diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-13 14:02:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-13 14:02:40 -0400 |
commit | 59a7b3a51a7cdfb8528ebc44a26a7577f28254d4 (patch) | |
tree | 3d6ce52a791122ebd0bd5c94c269140fe7df6b63 /Assistant.hs | |
parent | ff2414427b21324722ed74b754d72307084fc6a5 (diff) |
finish daemon status thread
Diffstat (limited to 'Assistant.hs')
-rw-r--r-- | Assistant.hs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Assistant.hs b/Assistant.hs index bc394bd99..eb8fd7054 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -60,15 +60,18 @@ startDaemon foreground pidfile <- fromRepo gitAnnexPidFile go $ Utility.Daemon.daemonize logfd (Just pidfile) False where - go a = withThreadState $ \st -> liftIO $ a $ do + go a = withThreadState $ \st -> do dstatus <- startDaemonStatus - changechan <- newChangeChan - -- The commit thread is started early, so that the user - -- can immediately begin adding files and having them - -- committed, even while the startup scan is taking - -- place. - _ <- forkIO $ commitThread st changechan - watchThread st dstatus changechan + liftIO $ a $ do + changechan <- newChangeChan + -- The commit thread is started early, + -- so that the user can immediately + -- begin adding files and having them + -- committed, even while the startup scan + -- is taking place. + _ <- forkIO $ commitThread st changechan + _ <- forkIO $ daemonStatusThread st dstatus + watchThread st dstatus changechan stopDaemon :: Annex () stopDaemon = liftIO . Utility.Daemon.stopDaemon =<< fromRepo gitAnnexPidFile |