< prev index next >

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

Print this page

2638                 if (thread instanceof BaseVirtualThread vthread) {
2639                     vthread.parkNanos(nanos);
2640                 } else {
2641                     throw new WrongThreadException();
2642                 }
2643             }
2644 
2645             public void unparkVirtualThread(Thread thread) {
2646                 if (thread instanceof BaseVirtualThread vthread) {
2647                     vthread.unpark();
2648                 } else {
2649                     throw new WrongThreadException();
2650                 }
2651             }
2652 
2653             public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
2654                                                       ContinuationScope contScope,
2655                                                       Continuation continuation) {
2656                 return StackWalker.newInstance(options, null, contScope, continuation);
2657             }


















2658         });
2659     }
2660 }

2638                 if (thread instanceof BaseVirtualThread vthread) {
2639                     vthread.parkNanos(nanos);
2640                 } else {
2641                     throw new WrongThreadException();
2642                 }
2643             }
2644 
2645             public void unparkVirtualThread(Thread thread) {
2646                 if (thread instanceof BaseVirtualThread vthread) {
2647                     vthread.unpark();
2648                 } else {
2649                     throw new WrongThreadException();
2650                 }
2651             }
2652 
2653             public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
2654                                                       ContinuationScope contScope,
2655                                                       Continuation continuation) {
2656                 return StackWalker.newInstance(options, null, contScope, continuation);
2657             }
2658 
2659             @Override
2660             public Class<?> asPrimaryType(Class<?> clazz) {
2661                 return clazz.asPrimaryType();
2662             }
2663             public Class<?> asValueType(Class<?> clazz) {
2664                 return clazz.asValueType();
2665             }
2666 
2667             public boolean isPrimaryType(Class<?> clazz) {
2668                 return clazz.isPrimaryType();
2669             }
2670             public boolean isPrimitiveValueType(Class<?> clazz) {
2671                 return clazz.isPrimitiveValueType();
2672             }
2673             public boolean isPrimitiveClass(Class<?> clazz) {
2674                 return clazz.isPrimitiveClass();
2675             }
2676         });
2677     }
2678 }
< prev index next >