Skip to content

Commit 0f340a9

Browse files
committed
added words about aot/runtime target mismatch
1 parent 4b328de commit 0f340a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/vthreads.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ Users can also set the Java system property `clojure.core.async.vthreads` to con
3535
- `"target"` - Always target virtual threads when compiling `go` blocks and require them at runtime in `io-thread` blocks
3636
- `"avoid"` - Always use IOC when compiling `go` blocks (will work regardless), and do not use virtual threads for `io-thread` blocks
3737

38+
There is one circumstance that needs special attention. That is, users can choose to AOT compile their applications/libraries and target virtual threads using the `"target"` flag. However, users may run that compiled code on a JVM without virtual threads support. By using "target" to compile code, you've fixed an expectation of that the runtime environment support virtual threads. When users run compiled code targeting virtual threads in a runtime environment without them then `go` blocks will not guarantee non-blocking semantics anymore. In this particular circumstance, core.async will throw an error when the compiled `"target"` expectation does not match the runtime capability.

0 commit comments

Comments
 (0)