I'm also facing the same problem -

(let [handler (agent 50)
        a (agent 42
            :error-handler
            (fn [_ ex]
              (do
                (println "Inside agent a error handler fn" (Thread/
currentThread))
                (send handler
                  (fn [_] (do (println ex (Thread/currentThread)))
60))
                (println "Inside agent a error handler fn - after
sending to the handler agent")
                (await handler)
                (println "CODE DOESN'T REACH HERE ??")
                (println "State of handler agent:" @handler))))]
    (send a (fn [_]
              (println "Inside agent a function" (Thread/
currentThread))
              (throw (Exception. "bad news"))))
    (Thread/sleep 1000)
    ;(println "Errors with a:" (agent-error a))
    ;(println "Errors with handler:" (agent-error handler))
    (shutdown-agents)
    (println "Errors with a:" (agent-error a))
    (println "Errors with handler:" (agent-error handler))
    (println @a)
    (println @handler))

- Thanks

-- 
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