Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ignore UnsupportedOperationException for virtual threads (#2866)
The virtual threads util that tries to create a virtual thread factory on JVMs that support this would fail on Java 20, because: 1. Java 20 supports virtual threads as an experimental feature. This means that the code is present. 2. The feature is by default disabled, and throws an UnsupportedOperationException. This fix takes the above into account and returns null if a user tries to create a virtual threads factory on Java 20 with experimental features disabled.
- Loading branch information