tail/watch
Benoit Sigoure ac5972aca8 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-04-08 16:29:40 -07:00
..
filechanges.go Remove Close method from FileChanges 2014-12-25 21:02:30 -05:00
inotify.go Changes the path clean to absolute path 2016-04-04 15:51:37 -07:00
inotify_tracker.go watch: Unsubscribe from fsnotify synchronously. 2016-04-08 16:29:40 -07:00
polling.go Merge branch 'stop-at-eof' of https://github.com/flynn/tail into flynn-stop-at-eof 2016-04-04 12:56:46 -07:00
watch.go fix data race 2015-12-24 16:47:46 +08:00