Skip to content

Commit

Permalink
reflect for vthreads
Browse files Browse the repository at this point in the history
  • Loading branch information
fogus committed Feb 26, 2025
1 parent 35e7ad9 commit 6139a90
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/clojure/clojure/core/async/impl/dispatch.clj
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@
(defn- make-io-executor
[]
(if virtual-threads-available?
(-> (Thread/ofVirtual)
(Thread$Builder/.name "async-vthread-io-" 0)
.factory
Executors/newThreadPerTaskExecutor)
(-> (Class/.getDeclaredMethod Executors "newVirtualThreadPerTaskExecutor" (make-array Class 0))
(.invoke nil (make-array Class 0)))
(make-ctp-named :io)))

(defn ^:private create-default-executor
Expand Down

0 comments on commit 6139a90

Please sign in to comment.