coreos/etcd — pull request #461 by xiangli-cmu (2014-01-09 07:35:56+00:00)
Title: feat(stream watchers) add stream watcher support

@cenkalti This pull request will close yours.
The main change is that we have to make sure the stream will not block the etcd system.

Also we have to remove the non-streaming watcher just after notify return. Or a race might happen, which will notify the non-stream twice and cause a dead-lock.

@philips `Stream watcher` should only be used as a debugging tool or to watch keys changing in a low frequency. Or the streamWatcher will not be able to catch up with the speed of the changes. A lot of go-routines will be created.