On Sep 15, 9:27 am, CuppoJava <patrickli_2...@hotmail.com> wrote: > Yes. I haven't personally run into any problems (since I handle my own > threading), but it's explicitly stated that you shouldn't put mutable > data into Clojure's immutable data structures. It's possible that I > misunderstood what is meant by this. It would be best to ask someone > who's familiar with the STM.
Hm. It looks like the example on the agent reference page (http:// clojure.org/agents) uses agents whose values are maps containing other agents, so I believe this is fine. I suspect the problem occurs when using unsafe Java instances inside Clojure's immutable data structures. Maybe someone more familiar with Clojure's concurrency model can enlighten us on this topic. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---