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 821a671 commit 8e23d93Copy full SHA for 8e23d93
src/main/clojure/clojure/core/async/impl/dispatch.clj
@@ -62,11 +62,12 @@
62
(Executors/newCachedThreadPool (counted-thread-factory (str "async-" (name workload) "-%d") true)))
63
64
(def virtual-threads-available?
65
- (try
66
- (Class/forName "java.lang.Thread$Builder$OfVirtual")
67
- true
68
- (catch ClassNotFoundException _
69
- false)))
+ (delay
+ (try
+ (Class/forName "java.lang.Thread$Builder$OfVirtual")
+ true
+ (catch ClassNotFoundException _
70
+ false))))
71
72
(def aot-compiling? clojure.core/*compile-files*)
73
@@ -81,7 +82,7 @@
81
82
(defn runtime-vthreads? []
83
(and (not aot-compiling?)
84
(not (vthreads-directive-of "avoid"))
- virtual-threads-available?))
85
+ @virtual-threads-available?))
86
87
(defn- make-io-executor
88
[]
0 commit comments