Can someone explain why the getHistoryCount method in Ref.java
acquires a write lock instead of a read lock? I say in my STM article:

"It acquires a write lock instead of a read lock because it walks the
history chain to get the count and needs to prevent other threads from
modifying the chain while it does this."

However, acquiring a read lock would seem to serve the same purpose. I
believe the chain of TVal objects is only modified when the write lock
is held and that can't happen if another thread holds a read lock.

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

Reply via email to