> Since transients enforce single-threadedness, there's no reason to put > it in an atom. You're right that would work for the truly > single-threaded scenario. I'm more interested right now in the > scenario of "multi-threaded, low-contention, only occasionally need a > snapshot (for iteration without blocking)", so I hadn't really thought > in terms of transients, but I appreciate the reminder. Maybe some of > the new pod work will eventually help here since it will reportedly > allow for other sorts of ways to manage the mutable contents. Good > thinking,
Well, if your updates come in batches, you could still see significant benefits by storing the persistent map in an atom and using transients to perform the batch updates within a single call to swap!. Otherwise, I guess they might not be suitable for your purpose (yet -- we'll see what happens with pods). -Jason -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
