File tree 2 files changed +15
-8
lines changed
src/main/clojure/clojure/core
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
40
40
used instead.
41
41
42
42
The 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
+ "
44
57
(:refer-clojure :exclude [reduce transduce into merge map take partition
45
58
partition-by bounded-count])
46
59
(:require [clojure.core.async.impl.protocols :as impl]
Original file line number Diff line number Diff line change 71
71
(def aot-compiling? clojure.core /*compile-files*)
72
72
73
73
(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."
81
75
[s]
82
76
(= s (System/getProperty " clojure.core.async.vthreads" )))
83
77
You can’t perform that action at this time.
0 commit comments