< prev index next >

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

Print this page
*** 53,10 ***
--- 53,11 ---
  import jdk.internal.reflect.ConstantPool;
  import jdk.internal.vm.Continuation;
  import jdk.internal.vm.ContinuationScope;
  import jdk.internal.vm.StackableScope;
  import jdk.internal.vm.ThreadContainer;
+ import sun.nio.ch.NativeThread;
  import sun.reflect.annotation.AnnotationType;
  import sun.nio.ch.Interruptible;
  
  public interface JavaLangAccess {
  

*** 559,10 ***
--- 560,20 ---
      /**
       * Return the current thread's scoped value bindings.
       */
      Object scopedValueBindings();
  
+     /**
+      * Returns the NativeThread for signalling, null if not set.
+      */
+     NativeThread nativeThread(Thread thread);
+ 
+     /**
+      * Sets the NativeThread for the current platform thread.
+      */
+     void setNativeThread(NativeThread nt);
+ 
      /**
       * Returns the innermost mounted continuation
       */
      Continuation getContinuation(Thread thread);
  

*** 601,10 ***
--- 612,15 ---
      /**
       * Returns the virtual thread default scheduler.
       */
      Executor virtualThreadDefaultScheduler();
  
+     /**
+      * Returns the scheduler for the given virtual thread.
+      */
+     Executor virtualThreadScheduler(Thread thread);
+ 
      /**
       * Creates a new StackWalker
       */
      StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
                                         ContinuationScope contScope,
< prev index next >