Hi - I'm struggling with what is probably a very basic STM problem... so forgive me if I've missed something obvious.
I have a world that is a list of structures The world itself will change occasionally - i.e. I'll add or remove structures from the overall list, and I'll regularly be reading the whole list. However quite often I'll just want to change individual structures without affecting the rest of the world. So, putting this in terms of refs - do I use: (A) one ref for the whole world - in which case how do I stop parallel changes to two unrelated structures in the world from causing transaction retries? (B) one ref for each structure in the world - so the "world" list is a list of refs - but then how do I change the world itself? (C) both of the above - a ref for the "world" list which itself contains a list of refs to each structure I suspect the answer is 'c' - will this work? Or have I over complicated something somewhere? - Korny -- Kornelis Sietsma korny at my surname dot com "Every jumbled pile of person has a thinking part that wonders what the part that isn't thinking isn't thinking of" --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---