Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Declined
-
Affects Version/s: None
-
Fix Version/s: Backlog
-
Component/s: None
-
Labels:None
-
Approval:Not Approved
Description
Starting with a fresh REPL and entering the following:
(def counter (agent 0)) (defn add1 [x] (inc x)) (send counter add1) ;; repeat many times (send counter add1)
The representation printed at the REPL will not always display the correct value for the agent (e.g. the second call to `send` would print #<Agent@743fba: 1>). This appears to happen only in the first few calls to `send` before the value eventually "catches up". This behavior of course never occurs with `send-off`. This appears to only affect the printed value and not the actual value, but can still cause confusion.
My setup is as follows:
Mac OSX 10.5
Clojure 1.0.0
Running with `java -server -cp $CP jline.ConsoleRunner clojure.lang.Repl $*` where $CP points to clojure.jar, clojure-contrib.jar, and jline.jar
This also occurs with a fresh build of Clojure 1.1.0-alpha-SNAPSHOT from github.
-m
Converted from http://www.assembla.com/spaces/clojure/tickets/132