We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15e553d commit a5de958Copy full SHA for a5de958
CHANGELOG.md
@@ -5,6 +5,7 @@
5
## Fixed
6
7
- Fix beholder watch functionality that would cause a NullPointerException earlier.
8
+- Make `kaocha.jit/jit` thread-safe in Clojure 1.10+. For lower versions, best effort with printed warning.
9
10
## Changed
11
src/kaocha/jit.clj
@@ -4,5 +4,10 @@
4
"Just in time loading of dependencies."
[sym]
`(do
- (require '~(symbol (namespace sym)))
+ (locking ~(if (find-var 'clojure.core/requiring-resolve)
+ 'clojure.lang.RT/REQUIRE_LOCK
+ (do (binding [*err* *out*]
+ (println "WARNING: kaocha.jit is not thread-safe before Clojure 1.10"))
+ ::lock))
12
+ (require '~(symbol (namespace sym))))
13
(find-var '~sym)))
0 commit comments