@@ -46,14 +46,22 @@ Use the Java system property `clojure.core.async.vthreads` to control
46
46
how core.async uses JDK 21+ virtual threads. The property can be one of
47
47
the following values:
48
48
49
- unset - always default to ioc when aot, and use virtual threads for
50
- `io-thread` blocks if available at runtime
51
-
52
- \" target\" - target vthreads when compiling go and require them at runtime.
53
- use vthreads in io-thread when available
54
-
55
- \" avoid\" - use ioc when compiling go (will work regardless), do not use
56
- vthreads for io-thread blocks
49
+ unset - core.async will opportunistically use vthreads when available
50
+ (≥ Java 21) and will otherwise use the old IOC impl. io-thread and :io
51
+ thread pool will run on platform threads if vthreads are not available.
52
+ If AOT compiling, go blocks will always use IOC so that the resulting
53
+ bytecode works on all JVMs (so no change in compiled output)
54
+
55
+ \" target\" - means that you are targeting virtual threads. At runtime
56
+ from source, go blocks will use vthreads if available, but will fall back
57
+ to IOC if not available. If AOT compiling, go blocks are always compiled
58
+ as normal Clojure code to be run on vthreads and will throw at runtime
59
+ if vthreads are not available (Java <21)
60
+
61
+ \" avoid\" - means that vthreads will not be used - you can use this to
62
+ minimize impacts if you are not yet ready to evaluate vthreads in your app.
63
+ If AOT compiling, go blocks will use IOC. At runtime, io-thread and the
64
+ :io thread pool use platform threads
57
65
"
58
66
(:refer-clojure :exclude [reduce transduce into merge map take partition
59
67
partition-by bounded-count])
0 commit comments