Package org.h2.util
Class Utils21
- java.lang.Object
-
- org.h2.util.Utils21
-
public final class Utils21 extends java.lang.ObjectUtilities 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ThreadnewVirtualThread(java.lang.Runnable task)Creates a new virtual thread (on Java 21+) for the specified task.
-
-
-
Method Detail
-
newVirtualThread
public static java.lang.Thread newVirtualThread(java.lang.Runnable task)
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
-
-