< prev index next >

src/java.base/share/classes/java/lang/System.java

Print this page
@@ -52,11 +52,10 @@
  import java.util.Map;
  import java.util.Objects;
  import java.util.Properties;
  import java.util.ResourceBundle;
  import java.util.Set;
- import java.util.concurrent.Executor;
  import java.util.function.Supplier;
  import java.util.concurrent.ConcurrentHashMap;
  import java.util.stream.Stream;
  
  import jdk.internal.javac.Restricted;

@@ -2321,11 +2320,23 @@
                  } else {
                      throw new IllegalArgumentException();
                  }
              }
  
-             public Executor virtualThreadDefaultScheduler() {
+             public void lazyUnparkVirtualThread(Thread thread) {
+                 if (thread instanceof BaseVirtualThread vthread) {
+                     vthread.lazyUnpark();
+                 } else {
+                     throw new IllegalArgumentException();
+                 }
+             }
+ 
+             public Thread.VirtualThreadScheduler builtinVirtualThreadScheduler() {
+                 return VirtualThread.builtinScheduler(true);
+             }
+ 
+             public Thread.VirtualThreadScheduler defaultVirtualThreadScheduler() {
                  return VirtualThread.defaultScheduler();
              }
  
              public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
                                                        ContinuationScope contScope,
< prev index next >