< 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;

@@ -568,10 +567,20 @@
      /**
       * Return the current thread's scoped value bindings.
       */
      Object scopedValueBindings();
  
+     /**
+      * Returns the native thread ID for the given platform thread or 0 if not set.
+      */
+     long nativeThreadID(Thread thread);
+ 
+     /**
+      * Sets the native thread ID for the current platform thread.
+      */
+     void setThreadNativeID(long id);
+ 
      /**
       * Returns the innermost mounted continuation
       */
      Continuation getContinuation(Thread thread);
  

@@ -606,13 +615,23 @@
       * @throws RejectedExecutionException if the scheduler cannot accept a task
       */
      void unparkVirtualThread(Thread thread);
  
      /**
-      * Returns the virtual thread default scheduler.
+      * Returns the default virtual thread scheduler.
+      */
+     Thread.VirtualThreadScheduler defaultVirtualThreadScheduler();
+ 
+     /**
+      * Returns true if using a custom default virtual thread scheduler.
+      */
+     boolean isCustomDefaultVirtualThreadScheduler();
+ 
+     /**
+      * Returns the scheduler for the given virtual thread.
       */
-     Executor virtualThreadDefaultScheduler();
+     Thread.VirtualThreadScheduler virtualThreadScheduler(Thread thread);
  
      /**
       * Creates a new StackWalker
       */
      StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
< prev index next >