< prev index next >

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

Print this page

2614                 if (thread instanceof BaseVirtualThread vthread) {
2615                     vthread.parkNanos(nanos);
2616                 } else {
2617                     throw new WrongThreadException();
2618                 }
2619             }
2620 
2621             public void unparkVirtualThread(Thread thread) {
2622                 if (thread instanceof BaseVirtualThread vthread) {
2623                     vthread.unpark();
2624                 } else {
2625                     throw new WrongThreadException();
2626                 }
2627             }
2628 
2629             public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
2630                                                       ContinuationScope contScope,
2631                                                       Continuation continuation) {
2632                 return StackWalker.newInstance(options, null, contScope, continuation);
2633             }


















2634         });
2635     }
2636 }

2614                 if (thread instanceof BaseVirtualThread vthread) {
2615                     vthread.parkNanos(nanos);
2616                 } else {
2617                     throw new WrongThreadException();
2618                 }
2619             }
2620 
2621             public void unparkVirtualThread(Thread thread) {
2622                 if (thread instanceof BaseVirtualThread vthread) {
2623                     vthread.unpark();
2624                 } else {
2625                     throw new WrongThreadException();
2626                 }
2627             }
2628 
2629             public StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
2630                                                       ContinuationScope contScope,
2631                                                       Continuation continuation) {
2632                 return StackWalker.newInstance(options, null, contScope, continuation);
2633             }
2634 
2635             @Override
2636             public Class<?> asPrimaryType(Class<?> clazz) {
2637                 return clazz.asPrimaryType();
2638             }
2639             public Class<?> asValueType(Class<?> clazz) {
2640                 return clazz.asValueType();
2641             }
2642 
2643             public boolean isPrimaryType(Class<?> clazz) {
2644                 return clazz.isPrimaryType();
2645             }
2646             public boolean isPrimitiveValueType(Class<?> clazz) {
2647                 return clazz.isPrimitiveValueType();
2648             }
2649             public boolean isPrimitiveClass(Class<?> clazz) {
2650                 return clazz.isPrimitiveClass();
2651             }
2652         });
2653     }
2654 }
< prev index next >