On Fri, Dec 19, 2008 at 8:35 PM, Rowdy Rednose <rowdy.redn...@gmx.net> wrote: > > Apart from being blasphemous - would it be a good idea to override > clojure.lang.Ref in Java land? > > I want to create (children of?) refs in clojure that send an agent > when they change, so that I can create facilities to observe changes > to them.
I don't think it would be quite that easy. The implementation of Refs is shared with LockingTransaction. You saw that agents have watchers that do exactly this? Depending on how complex your use case, you might be able to get away with using agents and 'await' for now. Another option, as long as you don't tell Rich, is that you could abuse the validator function to send to your agent. Anyway, apparently watchers for Refs are planned, so you could just wait for that. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---