convert Watcher thread to Assistant monad
This is a nice win; much less code runs in Annex, so other threads have more chances to run concurrently. I do notice that renaming a file has gone from 1 to 2 commits. I think this is due to the above improvement letting the committer run more frequently, so it commits the rm first.
This commit is contained in:
parent
4dbdc2b666
commit
bad88e404a
4 changed files with 89 additions and 88 deletions
|
@ -90,9 +90,5 @@ check = do
|
|||
dstatus <- getAssistant daemonStatusHandle
|
||||
liftIO $ void $ addAlert dstatus $ sanityCheckFixAlert msg
|
||||
addsymlink file s = do
|
||||
d <- getAssistant id
|
||||
liftIO $ Watcher.runHandler (threadName d)
|
||||
(threadState d) (daemonStatusHandle d)
|
||||
(transferQueue d) (changeChan d)
|
||||
Watcher.onAddSymlink file s
|
||||
Watcher.runHandler Watcher.onAddSymlink file s
|
||||
insanity $ "found unstaged symlink: " ++ file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue