shutdown0() — netty Function Reference
Architecture documentation for the shutdown0() function in ManualIoEventLoop.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e1e5f93b_8032_a6be_b50a_57de4dda53f9["shutdown0()"] 6e8a7bbd_d782_0f59_8bd2_22f815f8ecad["ManualIoEventLoop"] e1e5f93b_8032_a6be_b50a_57de4dda53f9 -->|defined in| 6e8a7bbd_d782_0f59_8bd2_22f815f8ecad 33e28e96_e0f5_3396_b09a_2c4e2f93a3e8["shutdownGracefully()"] 33e28e96_e0f5_3396_b09a_2c4e2f93a3e8 -->|calls| e1e5f93b_8032_a6be_b50a_57de4dda53f9 359a2ece_ee2f_fda5_eaa2_7b2e3397698f["shutdown()"] 359a2ece_ee2f_fda5_eaa2_7b2e3397698f -->|calls| e1e5f93b_8032_a6be_b50a_57de4dda53f9 cb229a6f_1187_05e7_0073_c0b824cf6ff7["inEventLoop()"] e1e5f93b_8032_a6be_b50a_57de4dda53f9 -->|calls| cb229a6f_1187_05e7_0073_c0b824cf6ff7 d8560c28_a723_319b_2fa5_b340e2554ead["isShuttingDown()"] e1e5f93b_8032_a6be_b50a_57de4dda53f9 -->|calls| d8560c28_a723_319b_2fa5_b340e2554ead 5c67a711_94d8_0c2e_2269_2064aba35491["wakeup()"] e1e5f93b_8032_a6be_b50a_57de4dda53f9 -->|calls| 5c67a711_94d8_0c2e_2269_2064aba35491 style e1e5f93b_8032_a6be_b50a_57de4dda53f9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/ManualIoEventLoop.java lines 443–479
private void shutdown0(long quietPeriod, long timeout, int shutdownState) {
boolean inEventLoop = inEventLoop();
boolean wakeup;
int oldState;
for (;;) {
if (isShuttingDown()) {
return;
}
int newState;
wakeup = true;
oldState = state.get();
if (inEventLoop) {
newState = shutdownState;
} else if (oldState == ST_STARTED) {
newState = shutdownState;
} else {
newState = oldState;
wakeup = false;
}
if (state.compareAndSet(oldState, newState)) {
break;
}
}
if (quietPeriod != -1) {
gracefulShutdownQuietPeriod = quietPeriod;
}
if (timeout != -1) {
gracefulShutdownTimeout = timeout;
}
if (wakeup) {
// same as AbstractScheduledEventExecutor.WAKEUP_TASK
taskQueue.offer(WAKEUP_TASK);
handler.wakeup();
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does shutdown0() do?
shutdown0() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/ManualIoEventLoop.java.
Where is shutdown0() defined?
shutdown0() is defined in transport/src/main/java/io/netty/channel/ManualIoEventLoop.java at line 443.
What does shutdown0() call?
shutdown0() calls 3 function(s): inEventLoop, isShuttingDown, wakeup.
What calls shutdown0()?
shutdown0() is called by 2 function(s): shutdown, shutdownGracefully.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free