tail/watch
Benoit Sigoure 0bc5f080e8 watch: Unsubscribe from fsnotify synchronously.
Calling watcher.Remove() from the run() goroutine is now problematic,
because with the change made in fsnotify/fsnotify#73 Remove() can now
take an arbitrary amount of time, which means we can deadlock if run()
is waiting for fsnotify to acknowledge the removal and fsnotify is
trying to send an unrelated Event.

So instead we now do part of the cleanup, including calling Remove(),
synchronously, in the goroutine trying to unsubscribe.

This fixes #75.  Thanks to Aaron Beitch for the fix.

Change-Id: I346c9eecc34b2378312b07b3c3efc41616b95380
2016-03-01 10:05:17 -08:00
..
filechanges.go run 'go fmt' (and fix 'make fmt' in Makefile) 2013-11-13 17:38:23 -08:00
inotify.go fix data race 2015-12-24 16:47:46 +08:00
inotify_tracker.go watch: Unsubscribe from fsnotify synchronously. 2016-03-01 10:05:17 -08:00
polling.go fix data race 2015-12-24 16:47:46 +08:00
watch.go fix data race 2015-12-24 16:47:46 +08:00