public static interface TruffleSafepoint.Interrupter
Modifier and Type | Field and Description |
---|---|
static TruffleSafepoint.Interrupter |
THREAD_INTERRUPT
A thread interrupter implementation that uses
Thread.interrupt() and
Thread.interrupted() to clear the thread state. |
Modifier and Type | Method and Description |
---|---|
void |
interrupt(Thread thread)
Sets the interrupted state on a foreign thread.
|
void |
resetInterrupted()
Resets the interrupted state when executing on a thread after the thread was interrupted.
|
static final TruffleSafepoint.Interrupter THREAD_INTERRUPT
Thread.interrupt()
and
Thread.interrupted()
to clear the thread state.
THREAD_INTERRUPT = new Interrupter() { @Override public void interrupt(Thread t) { t.interrupt(); } @Override public void interrupted() { Thread.interrupted(); } };
void interrupt(Thread thread)
thread
- the thread to interruptvoid resetInterrupted()