diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-22 13:39:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-22 14:10:25 -0400 |
commit | 28e28bc0436cb0a33e570b1a1f678e80a770a21a (patch) | |
tree | d9acb7b66a19a64d6108f980c081f2537c9af353 /Assistant.hs | |
parent | 3ee44cf8feb11fc439c02eb0eb8f12d290b01120 (diff) |
stub syncer thread and commit channel
Diffstat (limited to 'Assistant.hs')
-rw-r--r-- | Assistant.hs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Assistant.hs b/Assistant.hs index 33c7cef36..5a3fa5a9d 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -22,9 +22,11 @@ - Thread 5: committer - Waits for changes to occur, and runs the git queue to update its - index, then commits. - - Thread 6: status logger + - Thread 6: syncer + - Waits for commits to be made, and syncs the git repo to remotes. + - Thread 7: status logger - Wakes up periodically and records the daemon's status to disk. - - Thread 7: sanity checker + - Thread 8: sanity checker - Wakes up periodically (rarely) and does sanity checks. - - ThreadState: (MVar) @@ -47,8 +49,10 @@ import Common.Annex import Assistant.ThreadedMonad import Assistant.DaemonStatus import Assistant.Changes +import Assistant.Commits import Assistant.Watcher import Assistant.Committer +import Assistant.Syncer import Assistant.SanityChecker import qualified Utility.Daemon import Utility.LogFile @@ -70,12 +74,9 @@ startDaemon assistant foreground dstatus <- startDaemonStatus 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 + commitchan <- newCommitChan + _ <- forkIO $ commitThread st changechan commitchan + _ <- forkIO $ syncThread st commitchan _ <- forkIO $ daemonStatusThread st dstatus _ <- forkIO $ sanityCheckerThread st dstatus changechan -- Does not return. |