Package org.openjdk.jmh.runner
Class ForkedMain.HangupThread
java.lang.Object
java.lang.Thread
org.openjdk.jmh.runner.ForkedMain.HangupThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
ForkedMain
Hangup thread will detach us from the host VM properly, in three cases:
- normal shutdown
- shutdown with benchmark exception
- any System.exit call
The need to intercept System.exit calls is the reason to register ourselves
as the shutdown hook. Additionally, this thread runs only when all non-daemon
threads are stopped, and therefore the stray user threads would be reported
by shutdown timeout thread over still alive binary link.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield