< prev index next >

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

Print this page

532      * @param nanos the maximum number of nanoseconds to wait
533      * @throws WrongThreadException if the current thread is not a virtual thread
534      */
535     void parkVirtualThread(long nanos);
536 
537     /**
538      * Re-enables a virtual thread for scheduling. If the thread was parked then
539      * it will be unblocked, otherwise its next attempt to park will not block
540      * @param thread the virtual thread to unpark
541      * @throws IllegalArgumentException if the thread is not a virtual thread
542      * @throws RejectedExecutionException if the scheduler cannot accept a task
543      */
544     void unparkVirtualThread(Thread thread);
545 
546     /**
547      * Creates a new StackWalker
548      */
549     StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
550                                        ContinuationScope contScope,
551                                        Continuation continuation);


































552 }

532      * @param nanos the maximum number of nanoseconds to wait
533      * @throws WrongThreadException if the current thread is not a virtual thread
534      */
535     void parkVirtualThread(long nanos);
536 
537     /**
538      * Re-enables a virtual thread for scheduling. If the thread was parked then
539      * it will be unblocked, otherwise its next attempt to park will not block
540      * @param thread the virtual thread to unpark
541      * @throws IllegalArgumentException if the thread is not a virtual thread
542      * @throws RejectedExecutionException if the scheduler cannot accept a task
543      */
544     void unparkVirtualThread(Thread thread);
545 
546     /**
547      * Creates a new StackWalker
548      */
549     StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
550                                        ContinuationScope contScope,
551                                        Continuation continuation);
552 
553     /**
554      * {@return the primary class for a primitive class}
555      *
556      * @param klass a class
557      */
558     Class<?> asPrimaryType(Class<?> klass);
559 
560     /**
561      * {@return the value type of a primitive class}
562      *
563      * @param klass a class
564      */
565     Class<?> asValueType(Class<?> klass);
566 
567     /**
568      * {@return true if the class is the primary type of a primitive class}
569      *
570      * @param klass a class
571      */
572     boolean isPrimaryType(Class<?> klass);
573 
574     /**
575      * {@return true if the class is the primary type of a primitive class}
576      *
577      * @param klass a class
578      */
579     boolean isPrimitiveValueType(Class<?> klass);
580 
581     /**
582      * Returns {@code true} if this class is a primitive class.
583      */
584     boolean isPrimitiveClass(Class<?> klass);
585 
586 }
< prev index next >