temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
209 stars 141 forks source link

Support for virtual threads (project Loom) #1448

Open dano opened 2 years ago

dano commented 2 years ago

JDK 19 introduces a preview version of Virtual Threads to Java. This enables applications to block a thread while waiting for some I/O to complete, without actually blocking any underlying OS thread. It seems like this would have big benefits for the Java SDK, since it currently does block OS threads while I/O is happening, and requires quite a bit of implementation complexity to evict those blocked threads from the cache, as well as carrying a performance penalty.

Are there plans to try to support this feature in the SDK? Obviously it is still a bit early, since the feature is just a preview right now, but it seems like it's worth looking into, given the potential benefits.

s-aliasgar commented 2 days ago

Now that Virtual Threads is a full-fledged feature in java https://openjdk.org/jeps/444 Can it please be adopted in Java-SDK