It's a clever box containing a value. You can open the box and read the current value. But you can't modify the content of the box directly.
You need to change the value in a box in a transaction. The cleverness of refs comes form the fact that all read and all write in a transaction are consistent with each other independently of other threads reading and writing. For a better and full explanation, as Wilson tells : http://clojure.org/concurrent_programming On Mon, Aug 16, 2010 at 4:32 AM, Wilson MacGyver <wmacgy...@gmail.com> wrote: > It's clojure's STM(Software Transaction Memory). More info at > http://clojure.org/concurrent_programming > > On Aug 15, 2010, at 11:26 PM, HB <hubaghd...@gmail.com> wrote: > >> Hey, >> I don't understand what "references" are. >> (ref #{}) >> This creates a reference to an empty set but what is "reference" any >> way? >> Thanks for help and time. > > -- > 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 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