public final class Utils21
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Thread |
newVirtualThread(java.lang.Runnable task)
Creates a new virtual thread (on Java 21+) for the specified task.
|
public static java.lang.Thread newVirtualThread(java.lang.Runnable task)
Thread.start() to schedule the thread to execute. On older
versions of Java a platform daemon thread is created instead.task - the object to run