How can I see the number of rollbacks in my STM in Clojure? -


how can see number of rollbacks in stm in clojure?

you can't... unless willing cheat:

(defmacro spy-dosync [& body]   `(let [retries# (atom -1)          result# (dosync                    (swap! retries# inc)                    ~@body)]      (println "retries count:" @retries#)      result#)) 

and replace dosync spy-dosync.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -