I was toying around with agents today, and I got a weird behavior:
agents hang clojure.lang.Script. Here's a simple demo script; if you
run this script, it'll print the vector and the program will be
hung.
(let [a (agent [])]
(doseq [i (range 10)]
(send-off a conj i))
(await a)
(println @a))
$ java -cp $HOME/src/clojure/clojure.jar clojure.lang.Script
agents.clj
[0 1 2 3 4 5 6 7 8 9]
# Script is hung here
Running the same code in clojure.lang.Repl prints the vector, returns
nil and gives you a new prompt.
Is it "normal" behavior, is there some sort of clean up that needs to
be done, am I not using agents correctly?
Thanks for the help,
Vincent.
P.S. This is with r1125
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---