< prev index next >

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

Print this page
@@ -60,10 +60,11 @@
  import java.util.PropertyPermission;
  import java.util.ResourceBundle;
  import java.util.Set;
  import java.util.WeakHashMap;
  import java.util.concurrent.Executor;
+ import java.util.concurrent.ScheduledExecutorService;
  import java.util.function.Supplier;
  import java.util.concurrent.ConcurrentHashMap;
  import java.util.stream.Stream;
  
  import jdk.internal.javac.Restricted;

@@ -2424,10 +2425,14 @@
  
              public Executor virtualThreadDefaultScheduler() {
                  return VirtualThread.defaultScheduler();
              }
  
+             public Stream<ScheduledExecutorService> virtualThreadDelayedTaskSchedulers() {
+                 return VirtualThread.delayedTaskSchedulers();
+             }
+ 
              public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
                                                        ContinuationScope contScope,
                                                        Continuation continuation) {
                  return StackWalker.newInstance(options, null, contScope, continuation);
              }
< prev index next >