I'm struggling to understand the following lines of code from
clojure.lang.LockingTransaction.run:

if (ref.tvals == null) {
                            ref.tvals = new Ref.TVal(e.getValue(),
commitPoint, msecs);
                        } else if (ref.faults.get() > 0) {
                            ref.tvals = new Ref.TVal(e.getValue(),
commitPoint, msecs, ref.tvals);
                            ref.faults.set(0);
                        } else {
                            ref.tvals = ref.tvals.next;
                            ref.tvals.val = e.getValue();
                            ref.tvals.point = commitPoint;
                            ref.tvals.msecs = msecs;
                        }

I don't understand the motivation for ref.faults and the difference
between the second and third cases.

Also Ref.trimHistory() appears to be unused -- when is it safe to call
it?

Thanks for any tips.

Tom
--~--~---------~--~----~------------~-------~--~----~
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
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