Re: Q: dosync semantics

2009-09-21 Thread Roger Gilliar
Hi ! Am 21.09.2009 um 15:55 schrieb Jarkko Oranen: > > In any case, the synchronisation guarantees that if you have a > starting list A, either the remove or the append operation will be > applied to it, producing A', and the remaining operation will be > applied to A', producing the final value o

Re: Q: dosync semantics

2009-09-21 Thread Jarkko Oranen
On Sep 21, 4:38 pm, Roger Gilliar wrote: > I still have some problems to correctly understand the dosync   > semantic.  What happens exaclty if two threads try to modify the same   > list: Nitpick: you're not modifying any lists. :) The only mutating things are the Refs > > Example > > thread

Q: dosync semantics

2009-09-21 Thread Roger Gilliar
I still have some problems to correctly understand the dosync semantic. What happens exaclty if two threads try to modify the same list: Example thread 1: (dosync append an item to a list ... ) thread 2: (dosync remove an item from a list .. ) Is it true that If thread 1 is