< prev index next > src/java.base/share/classes/java/lang/System.java
Print this page
import jdk.internal.vm.ContinuationScope;
import jdk.internal.vm.StackableScope;
import jdk.internal.vm.ThreadContainer;
import jdk.internal.vm.annotation.IntrinsicCandidate;
import jdk.internal.vm.annotation.Stable;
+ import sun.nio.ch.NativeThread;
import sun.reflect.annotation.AnnotationType;
import sun.nio.ch.Interruptible;
import sun.nio.cs.UTF_8;
/**
public Object scopedValueBindings() {
return Thread.scopedValueBindings();
}
+ public NativeThread nativeThread(Thread thread) {
+ return thread.nativeThread();
+ }
+
+ public void setNativeThread(NativeThread nt) {
+ Thread.currentThread().setNativeThread(nt);
+ }
+
public Continuation getContinuation(Thread thread) {
return thread.getContinuation();
}
public void setContinuation(Thread thread, Continuation continuation) {
public void unparkVirtualThread(Thread thread) {
if (thread instanceof BaseVirtualThread vthread) {
vthread.unpark();
} else {
! throw new WrongThreadException();
}
}
public Executor virtualThreadDefaultScheduler() {
return VirtualThread.defaultScheduler();
}
public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
ContinuationScope contScope,
Continuation continuation) {
return StackWalker.newInstance(options, null, contScope, continuation);
}
public void unparkVirtualThread(Thread thread) {
if (thread instanceof BaseVirtualThread vthread) {
vthread.unpark();
} else {
! throw new IllegalArgumentException();
}
}
public Executor virtualThreadDefaultScheduler() {
return VirtualThread.defaultScheduler();
}
+ public Executor virtualThreadScheduler(Thread thread) {
+ if (thread instanceof VirtualThread vthread) {
+ return vthread.scheduler();
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
ContinuationScope contScope,
Continuation continuation) {
return StackWalker.newInstance(options, null, contScope, continuation);
}
< prev index next >