< prev index next > src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java
Print this page
* Returns the Thread object for the current platform thread. If the
* current thread is a virtual thread then this method returns the carrier.
*/
Thread currentCarrierThread();
+ /**
+ * Returns the given virtual thread's carrier or {@code null} if not mounted.
+ * @throws UnsupportedOperationException if the thread is not a virtual thread
+ */
+ Thread getCarrierThread(Thread thread);
+
+ /**
+ * Returns the given virtual thread's internal state.
+ * @throws UnsupportedOperationException if the thread is not a virtual thread
+ */
+ int getInternalState(Thread thread);
+
/**
* Returns the value of the current carrier thread's copy of a thread-local.
*/
<T> T getCarrierThreadLocal(CarrierThreadLocal<T> local);
< prev index next >