Aside from virtual threads, two big features delivered by Project Loom in JDK 21 are Structured Concurrency (https://openjdk.org/jeps/453) and Scoped Values (https://openjdk.org/jeps/446).
The workaround today is to identify those instances with observation tools in the JDK and to replace them with java.util.concurrent locks, which don’t suffer from pinning. We’re working to stop synchronized from pinning so that this work won’t be needed.
Additionally, we’re working on improving the efficiency of the scheduling of IO operations by virtual threads, improving their performance further.