> Hi,
> 
> [disclojure]: I've asked about this on SO, but figured out what was happening 
> myself[1] and that led to this enquiry.
> 
> 
> It seems that the consistency of refs within an STM transaction (dosync) 
> depends on whether the ref has history. 
> 
> So if you create 2 refs and then read them in a transaction they could be 
> inconsistent with each other. i.e they won't necessarily return the value the 
> ref had at the start of the transaction.

> However, if you give the refs some history by updating them in a prior 
> transaction, then the two refs will be consistent with each other in 
> subsequent transactions.
> 
> This seems rather dangerous to me. Is there a rational for not creating at 
> least 1 history entry for a ref at ref creation time.
> 
> Neale
> {t: @sw1nn, w: sw1nn.com }
> 
> 
> [1] 
> http://stackoverflow.com/questions/10178639/are-refs-really-consistent-within-a-stm-transaction

Hi Neale,

Your example does not appear to match your conclusion. It shows that a 
transaction restarts, and that the reads are all consistent as of the restarted 
transaction.

Cheers,
Stu


Stuart Halloway
Clojure/core
http://clojure.com


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