Re: Refs and ensure

2008-10-15 Thread Rich Hickey
On Oct 14, 10:33 pm, Tom Davies <[EMAIL PROTECTED]> wrote: > In relational database terms, Clojure's STM has 'read-committed' > isolation when you don't use 'ensure', then? No, it's snapshot isolation, which is distinct from all of the traditional isolation levels: http://en.wikipedia.org/wiki/S

Re: Refs and ensure

2008-10-15 Thread Tom Davies
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

Re: Refs and ensure

2008-10-14 Thread jim
Thanks for the response, Rich. I really wanted to eliminate the possibility that the user of my library would accidentally overlook a ref that needed to be invariant during a transaction. That solution felt hackish, which is why I asked. At this point, I'll shift the burden to the programmer to

Re: Refs and ensure

2008-10-14 Thread Rich Hickey
On Oct 13, 9:51 pm, jim <[EMAIL PROTECTED]> wrote: > Rich, > > I've been working with refs tonight and I appreciate the validate-fn > addition. Makes my life a lot easier. > > From reading the docs, 'ensure' keeps a ref from changing inside a > dosync. But if accesses to refs are contained in fu

Refs and ensure

2008-10-13 Thread jim
Rich, I've been working with refs tonight and I appreciate the validate-fn addition. Makes my life a lot easier. >From reading the docs, 'ensure' keeps a ref from changing inside a dosync. But if accesses to refs are contained in function calls that are called during the transaction, the progr