summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-01-02 04:13:55 +0000
committerRich Hickey <richhickey@gmail.com>2009-01-02 04:13:55 +0000
commit2ea265f5e1d6de1b41a3f49e33f5d3fc85bd650a (patch)
tree84064705fc9d0baf47e338c2029ac10a6f63af18
parente26c24712a9e0f94e25aa6e9bdadea7835a7bec3 (diff)
fixed typo in add-watcher docs, explained var watchers
-rw-r--r--src/clj/clojure/core.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index 41504cd9..235c5f7f 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -1107,7 +1107,8 @@
additional arg, the reference. Whenever the reference's state
changes, any registered watchers will have their actions
sent. send-type must be one of :send or :send-off. The actions will
- be sent afer the reference's state is changed."
+ be sent after the reference's state is changed. Var watchers are
+ triggered only by root binding changes, not thread-local set!s"
[#^clojure.lang.IRef reference send-type watcher-agent action-fn]
(.addWatch reference watcher-agent action-fn (= send-type :send-off)))