aboutsummaryrefslogtreecommitdiff
path: root/doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-21 01:07:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-21 01:07:37 -0400
commit9f1a29762b074e668d3d6e7bea273c1f14f69b90 (patch)
tree204729e49d7e431046d3a6568182b7707840c8ca /doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn
parent019d0735052d2688dc0bdeb6ba51c46b77303aaf (diff)
blog for the day
Diffstat (limited to 'doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn')
-rw-r--r--doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn b/doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn
new file mode 100644
index 000000000..d7dab3611
--- /dev/null
+++ b/doc/design/assistant/blog/day_14__kqueue_kqueue_kqueue.mdwn
@@ -0,0 +1,23 @@
+... I'm getting tired of kqueue.
+
+But the end of the tunnel is in sight. Today I made git-annex handle files
+that are still open for write after a kqueue creation event is received.
+Unlike with inotify, which has a new event each time a file is closed,
+kqueue only gets one event when a file is first created, and so git-annex
+needs to retry adding files until there are no writers left.
+
+Eventually I found an elegant way to do that. The committer thread already
+wakes up every second as long as there's a pending change to commit. So for
+adds that need to be retried, it can just push them back onto the change
+queue, and the committer thread will wait one second and retry the add. One
+second might be too frequent to check, but it will do for now.
+
+This means that `git annex watch` should now be usable on OSX, FreeBSD, and
+NetBSD! (It'll also work on Debian kFreeBSD once [lsof is ported to it](http://bugs.debian.org/589103).)
+I've meged kqueue support to `master`.
+
+I also think I've squashed the empty commits that were sometimes made.
+
+Incidentally, I'm 50% through my first month, and finishing [[inotify]]
+was the first half of my roadmap for this month. Seem to be right on
+schedule.. Now I need to start thinking about [[syncing]].