On Wed, Aug 19, 2009 at 11:03 AM, Rich Hickey<richhic...@gmail.com> wrote: > > While I appreciate that you are trying to understand the > implementation of the STM, understanding the semantics of the STM in > terms of its implementation is wrong-way-around. > > The semantics are simpler, and the implementation is subject to > change. Retries will occur as needed to ensure the semantics, and no > one should be thinking in terms of "if I do this and another > transaction does that..." or read and write locks etc.
I agree in general, but I think there are many reasons that a person might want to understand what is happening under the covers. Here are some of them. 1) learn interesting things from the design of Clojure STM 2) understand it well enough to become convinced that it works as advertised 3) implement STM for some other programming language using ideas borrowed from the Clojure implementation 4) understand it well enough to be able to suggest improvements to it 5) understand it well enough to help with adding tool support (such as tracking the number of times a transaction retries and why it retries in order to tune usage) If feel like I understand commute and ensure much better after studying the code in LockingTransaction.java. -- R. Mark Volkmann Object Computing, Inc. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---