Skip to content

Commit 6139a90

Browse files
committed
reflect for vthreads
1 parent 35e7ad9 commit 6139a90

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@
8181
(defn- make-io-executor
8282
[]
8383
(if virtual-threads-available?
84-
(-> (Thread/ofVirtual)
85-
(Thread$Builder/.name "async-vthread-io-" 0)
86-
.factory
87-
Executors/newThreadPerTaskExecutor)
84+
(-> (Class/.getDeclaredMethod Executors "newVirtualThreadPerTaskExecutor" (make-array Class 0))
85+
(.invoke nil (make-array Class 0)))
8886
(make-ctp-named :io)))
8987

9088
(defn ^:private create-default-executor

0 commit comments

Comments
 (0)