Hi,

besides the answer you got from Shawn, I'd like to question your use of the 
agent system. This is not the way it is supposed to be used. To model a 
processing loop with agents you should send the action back to the agent itself.

(def running? (atom true))

(defn process
  [agent-state step]
  (when @running?
    (send-off *agent* process (inc step)))
  (+ agent-state step))

(def a (agent 0))
(send-off a process 1)
(Thread/sleep 100)
(reset! running? false)

Note: in an action *agent* refers to the current agent.

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to