Skip to content

Commit f698e5b

Browse files
committed
Changes based on Alex's feedback
1 parent 54db953 commit f698e5b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/main/clojure/clojure/core/async/impl/dispatch.clj

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,18 @@
8080
(catch ClassNotFoundException _
8181
false))))
8282

83-
(def aot-compiling? clojure.core/*compile-files*)
84-
85-
(defn vthreads-directive-of
86-
"Compares s to the value of the sysprop clojure.core.async.vthreads."
87-
[s]
88-
(= s (System/getProperty "clojure.core.async.vthreads")))
83+
(defn vthreads-directive
84+
"Retrieves the value of the sysprop clojure.core.async.vthreads."
85+
[]
86+
(System/getProperty "clojure.core.async.vthreads"))
8987

9088
(defn aot-vthreads? []
91-
(and aot-compiling? (vthreads-directive-of "target")))
89+
(and clojure.core/*compile-files*
90+
(= (vthreads-directive) "target")))
9291

9392
(defn runtime-vthreads? []
94-
(and (not aot-compiling?)
95-
(not (vthreads-directive-of "avoid"))
93+
(and (not clojure.core/*compile-files*)
94+
(not= (vthreads-directive) "avoid")
9695
@virtual-threads-available?))
9796

9897
(defn- make-io-executor

0 commit comments

Comments
 (0)