summaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-20 19:04:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-20 19:29:53 -0400
commit33b914bcf1f277aecccb4194e296f17f4708e434 (patch)
tree0995105b30ef3d3508761d80b0091e7d9545d659 /Assistant.hs
parente0fdfb2e706da2cb1451193c658dc676b0530968 (diff)
pending adds now retried for kqueue
Rethought how to keep track of pending adds that need to be retried later. The commit thread already run up every second when there are changes, so let's keep pending adds queued as changes until they're safe to add. Also, the committer is now smarter about avoiding empty commits when all the adds are currently unsafe, or in the rare case that an add event for a symlink is not received in time. It may avoid them entirely. This seems to work as before for inotify, and is untested for kqueue. (Actually commit batching seems to be improved for inotify, although I'm not sure why. I'm seeing only two commits made during large batch operations, and the first of those is the non-batch mode commit.)
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Assistant.hs b/Assistant.hs
index 554c37290..e924d9477 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -75,8 +75,8 @@ startDaemon foreground
-- begin adding files and having them
-- committed, even while the startup scan
-- is taking place.
+ _ <- forkIO $ commitThread st changechan
_ <- forkIO $ daemonStatusThread st dstatus
- _ <- forkIO $ commitThread st dstatus changechan
_ <- forkIO $ sanityCheckerThread st dstatus changechan
-- Does not return.
watchThread st dstatus changechan