On Sat, Oct 25, 2008 at 9:19 AM, Krukow <[EMAIL PROTECTED]> wrote: > > I am kind of embarrassed to ask this, but is there a "correct way" to > do this . Do you simply re-def a function, e.g., to time execution: > > (def old-f f) > (defn f [] (time old-f))
Looks good to me. > Under which conditions (e.g. which kind of Java interoperability) is > this thread safe? Supposing only clojure functions are calling f; it > would be thread safe, right? re-def'ing is atomic, I believe, so you shouldn't need to worry. There's no transaction support though, so if you've got several inter-dependant functions to replace, make sure you do it in an order that makes sense. --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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---