Skip to content

Commit

Permalink
CLJS-1498: Fix parallel build logging
Browse files Browse the repository at this point in the history
put lock around debug logging
  • Loading branch information
swannodette committed Dec 1, 2015
1 parent 25c67f1 commit f73c426
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/clojure/cljs/util.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,14 @@
(defn valid-js-id-start? [s]
(re-find #"(?U)^[\p{Alpha}_$]" s))

(def debug-prn-mutex (Object.))

(defn debug-prn
[& args]
(binding [*out* *err*]
(apply println args)))
(locking debug-prn-mutex
(apply println args)
(flush))))

(defmacro measure
"Like cljs.core/time but toggleable and takes a message string."
Expand Down

0 comments on commit f73c426

Please sign in to comment.