< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java

Print this page
@@ -41,11 +41,10 @@
  import java.security.ProtectionDomain;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
  import java.util.concurrent.ConcurrentHashMap;
- import java.util.concurrent.Executor;
  import java.util.concurrent.RejectedExecutionException;
  import java.util.stream.Stream;
  
  import jdk.internal.loader.NativeLibraries;
  import jdk.internal.misc.CarrierThreadLocal;

@@ -618,22 +617,34 @@
       * @throws WrongThreadException if the current thread is not a virtual thread
       */
      void parkVirtualThread(long nanos);
  
      /**
-      * Re-enables a virtual thread for scheduling. If the thread was parked then
-      * it will be unblocked, otherwise its next attempt to park will not block
+      * Re-enables a virtual thread for scheduling. If the thread is parked then it will
+      * be scheduled to continue, otherwise its next attempt to park will not block.
       * @param thread the virtual thread to unpark
       * @throws IllegalArgumentException if the thread is not a virtual thread
       * @throws RejectedExecutionException if the scheduler cannot accept a task
       */
      void unparkVirtualThread(Thread thread);
  
      /**
-      * Returns the virtual thread default scheduler.
+      * Re-enables a virtual thread for scheduling. If the thread is parked then it will
+      * be scheduled to continue, without guaranteeing that it will eventually continue
+      * execution.
       */
-     Executor virtualThreadDefaultScheduler();
+     void lazyUnparkVirtualThread(Thread thread);
+ 
+     /**
+      * Returns the builtin virtual thread scheduler.
+      */
+     Thread.VirtualThreadScheduler builtinVirtualThreadScheduler();
+ 
+     /**
+      * Returns the default virtual thread scheduler.
+      */
+     Thread.VirtualThreadScheduler defaultVirtualThreadScheduler();
  
      /**
       * Creates a new StackWalker
       */
      StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
< prev index next >