On Tuesday, July 17, 2012 7:50:10 PM UTC-4, red...@gmail.com wrote: > > if you do it as a lock, then readers must block writers (think it > through). Clojure's reference types + immutable datastructures and the > views on perception that underlay them are strongly opposed to readers > interfering with writers. > > > Why is it so? Does not the reader just get a snapshot copy of the atom state and does not care who writes to the original atom? If a lock is needed, it is only needed for a very short commit time (cannot read when a writer is committing), but not during the whole "swap!" function. That still sounds a lot better than re-try to me.
-- 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