< prev index next >

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

Print this page

46      * the thread is interrupted.
47      *
48      * The behavior of this method when the current thread is not this thread
49      * is not defined.
50      */
51     abstract void park();
52 
53     /**
54      * Parks current virtual thread up to the given waiting time until the parking
55      * permit is available or the thread is interrupted.
56      *
57      * The behavior of this method when the current thread is not this thread
58      * is not defined.
59      */
60     abstract void parkNanos(long nanos);
61 
62     /**
63      * Makes available the parking permit to the given this virtual thread.
64      */
65     abstract void unpark();








66 }
67 

46      * the thread is interrupted.
47      *
48      * The behavior of this method when the current thread is not this thread
49      * is not defined.
50      */
51     abstract void park();
52 
53     /**
54      * Parks current virtual thread up to the given waiting time until the parking
55      * permit is available or the thread is interrupted.
56      *
57      * The behavior of this method when the current thread is not this thread
58      * is not defined.
59      */
60     abstract void parkNanos(long nanos);
61 
62     /**
63      * Makes available the parking permit to the given this virtual thread.
64      */
65     abstract void unpark();
66 
67     /**
68      * Makes available the parking permit to the given this virtual thread. If the
69      * thread is parked then there is no guarantee that it will continue execution.
70      */
71     void lazyUnpark() {
72         unpark();
73     }
74 }
75 
< prev index next >