File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
src/main/clojure/clojure/core Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,20 @@ core.async. If not supplied the ExecutorService for :io will be
4040used instead.
4141
4242The set of contexts may grow in the future so the function should
43- return nil for unexpected contexts."
43+ return nil for unexpected contexts.
44+
45+ Use the Java system property `clojure.core.async.vthreads` to control
46+ how core.async uses JDK 21+ virtual threads. The property can be one of
47+ the following values:
48+
49+ \" unset\" - default to ioc when aot, always
50+
51+ \" target\" - target vthreads when compiling go and require them at runtime
52+ use vthreads in io-thread when available
53+
54+ \" avoid\" - use ioc when compiling go (will work regardless), do not use
55+ vthreads for io-thread
56+ "
4457 (:refer-clojure :exclude [reduce transduce into merge map take partition
4558 partition-by bounded-count])
4659 (:require [clojure.core.async.impl.protocols :as impl]
Original file line number Diff line number Diff line change 7171(def aot-compiling? clojure.core /*compile-files*)
7272
7373(defn vthreads-directive-of
74- " Returns the value of the sysprop clojure.core.async.vthreads, that can be one
75- of three values:
76- - \" unset\" = default to ioc when aot, always
77- - \" target\" = target vthreads when compiling go and require them at runtime
78- use vthreads in io-thread when available
79- - \" avoid\" = use ioc when compiling go (will work regardless), do not use
80- vthreads for io-thread"
74+ " Compares s to the value of the sysprop clojure.core.async.vthreads."
8175 [s]
8276 (= s (System/getProperty " clojure.core.async.vthreads" )))
8377
You can’t perform that action at this time.
0 commit comments