Package org.h2.util
Class Utils21
java.lang.Object
org.h2.util.Utils21
Utilities with specialized implementations for Java 21 and later versions.
This class contains basic implementations for older versions of Java and it
is overridden in multi-release JARs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadnewVirtualThread(Runnable task) Creates a new virtual thread (on Java 21+) for the specified task.
-
Method Details
-
newVirtualThread
Creates a new virtual thread (on Java 21+) for the specified task. UseThread.start()to schedule the thread to execute. On older versions of Java a platform daemon thread is created instead.- Parameters:
task- the object to run- Returns:
- a new thread
-