Skip to content

Commit f73c426

Browse files
committed
CLJS-1498: Fix parallel build logging
put lock around debug logging
1 parent 25c67f1 commit f73c426

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/clojure/cljs/util.cljc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,14 @@
174174
(defn valid-js-id-start? [s]
175175
(re-find #"(?U)^[\p{Alpha}_$]" s))
176176

177+
(def debug-prn-mutex (Object.))
178+
177179
(defn debug-prn
178180
[& args]
179181
(binding [*out* *err*]
180-
(apply println args)))
182+
(locking debug-prn-mutex
183+
(apply println args)
184+
(flush))))
181185

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

0 commit comments

Comments
 (0)