APIdia Launch Partner
Top Fields Constructors Methods
sun.nio.ch

public Class NativeThread

extends Object
Class Inheritance
Imports
java.util.concurrent.locks.LockSupport, jdk.internal.access.JavaLangAccess, .SharedSecrets

Field Summary

Modifier and TypeField and Description
private static final JavaLangAccess

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static native long
private static native void
init()

public static void
signal(Thread thread)

Signals the given thread.

private static native void
signal0(long tid)

pack-priv static boolean
supportPendingSignals()

Return true if the operating system supports pending signals.

private static native boolean
public static Thread
threadToSignal()

Returns the Thread to signal the current thread.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JLAback to summary
private static final JavaLangAccess JLA

Constructor Detail

NativeThreadback to summary
private NativeThread()

Method Detail

current0back to summary
private static native long current0()
initback to summary
private static native void init()
signalback to summary
public static void signal(Thread thread)

Signals the given thread. For a platform thread it sends a signal to the thread. For a virtual thread it just unparks it.

Exceptions
IllegalStateException:
if the thread is a platform thread that hasn't set its native ID
signal0back to summary
private static native void signal0(long tid)
supportPendingSignalsback to summary
pack-priv static boolean supportPendingSignals()

Return true if the operating system supports pending signals. If a signal is sent to a thread but cannot be delivered immediately then it will be delivered when the thread is in the appropriate state.

supportPendingSignals0back to summary
private static native boolean supportPendingSignals0()
threadToSignalback to summary
public static Thread threadToSignal()

Returns the Thread to signal the current thread. The first use of this method on a platform thread will capture the thread's native thread ID.