Package org.openjdk.jmh.runner
Class ForkedMain.HangupThread
- java.lang.Object
-
- java.lang.Thread
-
- org.openjdk.jmh.runner.ForkedMain.HangupThread
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- ForkedMain
private static class ForkedMain.HangupThread extends java.lang.Thread
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.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
HangupThread()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
-
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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-