Why does blocking cause a lock
I am using the following code for logging as a part of one handling of my
request. This code has been seen many times everywhere. When I make
multiple parallel calls, I get a deadlock because of this code.
(defn log [msg & vals]
(let [line (apply format msg vals)]
(locking System/out (println line))))
Anyone knows what could be going wrong here.
Thanks
No comments:
Post a Comment