Home / Function/ run() — netty Function Reference

run() — netty Function Reference

Architecture documentation for the run() function in ThreadPerChannelEventLoop.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3e6d1ce2_5922_d93a_09d4_657b43bee607["run()"]
  b87e07e1_e07d_3d5f_765a_d3d4c6ab5fef["ThreadPerChannelEventLoop"]
  3e6d1ce2_5922_d93a_09d4_657b43bee607 -->|defined in| b87e07e1_e07d_3d5f_765a_d3d4c6ab5fef
  373fc256_8123_14a6_3cdd_828ccd32f022["deregister()"]
  3e6d1ce2_5922_d93a_09d4_657b43bee607 -->|calls| 373fc256_8123_14a6_3cdd_828ccd32f022
  style 3e6d1ce2_5922_d93a_09d4_657b43bee607 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoop.java lines 64–91

    @Override
    protected void run() {
        for (;;) {
            Runnable task = takeTask();
            if (task != null) {
                task.run();
                updateLastExecutionTime();
            }

            Channel ch = this.ch;
            if (isShuttingDown()) {
                if (ch != null) {
                    ch.unsafe().close(ch.unsafe().voidPromise());
                }
                if (confirmShutdown()) {
                    break;
                }
            } else {
                if (ch != null) {
                    // Handle deregistration
                    if (!ch.isRegistered()) {
                        runAllTasks();
                        deregister();
                    }
                }
            }
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does run() do?
run() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoop.java.
Where is run() defined?
run() is defined in transport/src/main/java/io/netty/channel/ThreadPerChannelEventLoop.java at line 64.
What does run() call?
run() calls 1 function(s): deregister.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free