summaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-29 02:21:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-29 02:21:04 -0400
commit579f63b6b756ca51b8f9fe53c3e668500718d91f (patch)
tree20039581df67e034ef434749d37de41e9802d21d /Assistant.hs
parent040f68d628120e112e22bfb7100f9650dec940c8 (diff)
Assistant monad, stage 2.5
Converted several threads to run in the monad. Added a lot of useful combinators for working with the monad. Now the monad includes the name of the thread. Some debugging messages are disabled pending converting other threads.
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Assistant.hs b/Assistant.hs
index bdca20fef..8a1be3130 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -179,7 +179,7 @@ startAssistant assistant daemonize webappwaiter = withThreadState $ \st -> do
go = do
d <- getAssistant id
st <- getAssistant threadState
- dstatus <- getAssistant daemonStatus
+ dstatus <- getAssistant daemonStatusHandle
changechan <- getAssistant changeChan
commitchan <- getAssistant commitChan
pushmap <- getAssistant failedPushMap
@@ -189,7 +189,7 @@ startAssistant assistant daemonize webappwaiter = withThreadState $ \st -> do
branchhandle <- getAssistant branchChangeHandle
pushnotifier <- getAssistant pushNotifier
#ifdef WITH_WEBAPP
- urlrenderer <- liftIO $ newUrlRenderer
+ urlrenderer <- liftIO newUrlRenderer
#endif
mapM_ (startthread d)
[ watch $ commitThread st changechan commitchan transferqueue dstatus
@@ -203,13 +203,13 @@ startAssistant assistant daemonize webappwaiter = withThreadState $ \st -> do
, assist $ pushRetryThread st dstatus pushmap pushnotifier
, assist $ mergeThread st dstatus transferqueue branchhandle
, assist $ transferWatcherThread st dstatus transferqueue
- , assist $ transferPollerThread st dstatus
+ , assist $ transferPollerThread
, assist $ transfererThread st dstatus transferqueue transferslots commitchan
- , assist $ daemonStatusThread st dstatus
- , assist $ sanityCheckerThread st dstatus transferqueue changechan
+ , assist $ daemonStatusThread
+ , assist $ sanityCheckerThread
, assist $ mountWatcherThread st dstatus scanremotes pushnotifier
- , assist $ netWatcherThread st dstatus scanremotes pushnotifier
- , assist $ netWatcherFallbackThread st dstatus scanremotes pushnotifier
+ , assist $ netWatcherThread
+ , assist $ netWatcherFallbackThread
, assist $ transferScannerThread st dstatus scanremotes transferqueue
, assist $ configMonitorThread st dstatus branchhandle commitchan
#ifdef WITH_XMPP