awaitTermination() — netty Function Reference
Architecture documentation for the awaitTermination() function in ThreadPerChannelEventLoopGroup.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 550918a0_baf7_8c71_7348_49d8a45832ce["awaitTermination()"] 087189b8_1bd9_3f4f_71bf_da2f9e819990["ThreadPerChannelEventLoopGroup"] 550918a0_baf7_8c71_7348_49d8a45832ce -->|defined in| 087189b8_1bd9_3f4f_71bf_da2f9e819990 33d8df27_6974_99b5_3395_981893ea763a["isTerminated()"] 550918a0_baf7_8c71_7348_49d8a45832ce -->|calls| 33d8df27_6974_99b5_3395_981893ea763a style 550918a0_baf7_8c71_7348_49d8a45832ce fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoopGroup.java lines 242–269
@Override
public boolean awaitTermination(long timeout, TimeUnit unit)
throws InterruptedException {
long deadline = System.nanoTime() + unit.toNanos(timeout);
for (EventLoop l: activeChildren) {
for (;;) {
long timeLeft = deadline - System.nanoTime();
if (timeLeft <= 0) {
return isTerminated();
}
if (l.awaitTermination(timeLeft, TimeUnit.NANOSECONDS)) {
break;
}
}
}
for (EventLoop l: idleChildren) {
for (;;) {
long timeLeft = deadline - System.nanoTime();
if (timeLeft <= 0) {
return isTerminated();
}
if (l.awaitTermination(timeLeft, TimeUnit.NANOSECONDS)) {
break;
}
}
}
return isTerminated();
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does awaitTermination() do?
awaitTermination() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoopGroup.java.
Where is awaitTermination() defined?
awaitTermination() is defined in transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoopGroup.java at line 242.
What does awaitTermination() call?
awaitTermination() calls 1 function(s): isTerminated.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free