On Mar 3, 3:38 pm, Jeffrey Straszheim <straszheimjeff...@gmail.com> wrote: > I'm pretty sure I don't want an agent based model. I want clear > transactional semantics. However, there is no reason both should not > exist.
I think you can get solid transactions with lazy agents, since an update corresponds to a single step/data pulse/whatever. Pseudocode: (dosync Attach a watcher to all the cells, that when requested blocks until they've computed a new value Change the values of the base cells Send an update message to all the cells, which will cause them all to update exactly once Wait on the watcher) Since agents are integrated with the STM, my understanding is that the new data update will get written in all at once. Is that good enough for your purpose? As Raffael pointed out, the laziness doesn't get you recording of previous values... but that wouldn't be inordinately challenging to add in. Anand --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---