File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/main/clojure/clojure/core Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ IOC and vthread code.
169169 blockingop (-> op name (str " !" ) symbol)]
170170 `(def ~(with-meta op {:arglists `(list ~as) :doc doc})
171171 (fn [~'& ~'args]
172- (if (= " VirtualThread " ( .getSimpleName ( class ( Thread/currentThread ))) )
172+ (if (dispatch/in-vthread? )
173173 ~(list* apply blockingop '[args])
174174 (assert nil ~(str op " used not in (go ...) block" )))))))
175175
Original file line number Diff line number Diff line change 9191 (and virtual-threads-available?
9292 (not= (vthreads-directive ) " avoid" )))
9393
94+ (defn in-vthread? []
95+ (= " VirtualThread" (.getSimpleName (class (Thread/currentThread )))))
96+
9497(defn report-vthreads-not-available-error! []
9598 (throw (ex-info " Code compiled to target virtual threads, but is running without vthread support."
9699 {:runtime-jvm-version (System/getProperty " java.version" )
You can’t perform that action at this time.
0 commit comments