Hi,

On Fri, May 14, 2010 at 10:59:34AM -0700, ka wrote:

> (defn report-status  []
>   (dosync
>     (ensure my-hash)
>     (ensure new-keys)
>     (println @my-hash)
>     (println @new-keys)
>     ))

You can get rid of the I/O in the transaction and still see a consistent
snapshot by simply return the contents of the refs.

(defn report-status
  []
  (apply println (dosync [...@my-hash @new-keys])))

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