I think Cliff may mean that each STM-participating memory access is 3x
slower, but in Clojure, because of immutability, a very small
proportion of accesses are Ref accesses, whereas in C/C++ *all* memory
accesses would be.
I agree that there's lots of room for adding instrumentation to
Clojure's
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) {
On Oct 30, 7:14 pm, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> Then every iteration of ant behaviour (and evaporation etc.) creates
> a new thread, right? This implies that an agent is not forever bound
> to the same thread. Nor is a thread bound to one agent, as otherwise
> one could iter
On Oct 30, 12:14 pm, "Jim Menard" <[EMAIL PROTECTED]> wrote:
> I was looking at the same code today. My question is slightly
> different. In the code
>
> (defn evaporation [x]
> (when running
> (send-off *agent* #'evaporation))
> (evaporate)
> (. Thread (sleep evap-sleep-ms))
> nil)
In relational database terms, Clojure's STM has 'read-committed'
isolation when you don't use 'ensure', then?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to cloj