runShutdownHooks() — netty Function Reference
Architecture documentation for the runShutdownHooks() function in SingleThreadEventExecutor.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD da6e6a19_86d9_7143_e21b_0738d8d5c250["runShutdownHooks()"] c9189467_acbc_07ea_3a8c_fecfe22ec122["SingleThreadEventExecutor"] da6e6a19_86d9_7143_e21b_0738d8d5c250 -->|defined in| c9189467_acbc_07ea_3a8c_fecfe22ec122 2fbe8756_76da_a86e_960c_bf11273a6375["confirmShutdown()"] 2fbe8756_76da_a86e_960c_bf11273a6375 -->|calls| da6e6a19_86d9_7143_e21b_0738d8d5c250 style da6e6a19_86d9_7143_e21b_0738d8d5c250 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java lines 749–771
private boolean runShutdownHooks() {
boolean ran = false;
// Note shutdown hooks can add / remove shutdown hooks.
while (!shutdownHooks.isEmpty()) {
List<Runnable> copy = new ArrayList<Runnable>(shutdownHooks);
shutdownHooks.clear();
for (Runnable task: copy) {
try {
runTask(task);
} catch (Throwable t) {
logger.warn("Shutdown hook raised an exception.", t);
} finally {
ran = true;
}
}
}
if (ran) {
lastExecutionTime = getCurrentTimeNanos();
}
return ran;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does runShutdownHooks() do?
runShutdownHooks() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java.
Where is runShutdownHooks() defined?
runShutdownHooks() is defined in common/src/main/java/io/netty/util/concurrent/SingleThreadEventExecutor.java at line 749.
What calls runShutdownHooks()?
runShutdownHooks() is called by 1 function(s): confirmShutdown.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free