< prev index next >

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

Print this page

520      * @param nanos the maximum number of nanoseconds to wait
521      * @throws WrongThreadException if the current thread is not a virtual thread
522      */
523     void parkVirtualThread(long nanos);
524 
525     /**
526      * Re-enables a virtual thread for scheduling. If the thread was parked then
527      * it will be unblocked, otherwise its next attempt to park will not block
528      * @param thread the virtual thread to unpark
529      * @throws IllegalArgumentException if the thread is not a virtual thread
530      * @throws RejectedExecutionException if the scheduler cannot accept a task
531      */
532     void unparkVirtualThread(Thread thread);
533 
534     /**
535      * Creates a new StackWalker
536      */
537     StackWalker newStackWalkerInstance(Set<StackWalker.Option> options,
538                                        ContinuationScope contScope,
539                                        Continuation continuation);


































540 }

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