On 22 Apr 2013 20:19, "Timothy Washington" <twash...@gmail.com> wrote: > > Before getting into the nitty gritty, is there something obvious I can do to fix this code? Is alter a blocking call?
You are seeing STM transaction restarts in action It looks like you are assuming that STM will serialise your transactions like, say, RDBMS transactions, on a first come first served basis with subsequent transactions blocked until the current one is complete? If this is your assumption, it's not correct I'm afraid. You must write the body of the dosync such that it can run multiple times, each run starting with a different (but consistent) view of the ref universe. Without more nitty gritty it's difficult to know more. Possibly a queue is a better fit here? Have you considered using one from java.util.concurrent ? -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.