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 a27bad1Copy full SHA for a27bad1
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,11 @@
4
"Just in time loading of dependencies."
[sym]
`(do
- (require '~(symbol (namespace sym)))
+ (locking ~(if (and (<= 1 (:major *clojure-version*))
+ (<= 10 (:minor *clojure-version*)))
+ 'clojure.lang.RT/REQUIRE_LOCK
+ (do (binding [*err* *out*]
+ (println "WARNING: kaocha.jit is not thread-safe before Clojure 1.10"))
12
+ ::lock))
13
+ (require '~(symbol (namespace sym))))
14
(find-var '~sym)))
0 commit comments