Home / Function/ mainLoop() — netty Function Reference

mainLoop() — netty Function Reference

Architecture documentation for the mainLoop() function in ManualEventLoopTest.java from the netty codebase.

Function java Buffer Search calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  0cd60ac9_8ee4_d40c_6ef2_249d540cc521["mainLoop()"]
  e61f0aaf_7cf5_2dea_972c_51997ee44af8["ManualIoEventLoopRunner"]
  0cd60ac9_8ee4_d40c_6ef2_249d540cc521 -->|defined in| e61f0aaf_7cf5_2dea_972c_51997ee44af8
  569fe781_e331_036b_7453_a3b8c5422375["ManualIoEventLoopRunner()"]
  569fe781_e331_036b_7453_a3b8c5422375 -->|calls| 0cd60ac9_8ee4_d40c_6ef2_249d540cc521
  76348b11_722a_68f7_da94_18a9704b39b9["safeExecute()"]
  0cd60ac9_8ee4_d40c_6ef2_249d540cc521 -->|calls| 76348b11_722a_68f7_da94_18a9704b39b9
  style 0cd60ac9_8ee4_d40c_6ef2_249d540cc521 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-native-epoll/src/test/java/io/netty/channel/epoll/ManualEventLoopTest.java lines 188–203

            private void mainLoop() {
                while (!ioEventLoop.isShuttingDown()) {
                    ioEventLoop.run(0);
                    Runnable otherTask = otherTasks.poll();
                    if (otherTask != null) {
                        safeExecute(otherTask);
                    }
                }
                while (!ioEventLoop.isTerminated() || !otherTasks.isEmpty()) {
                    ioEventLoop.runNow();
                    Runnable otherTask = otherTasks.poll();
                    if (otherTask != null) {
                        safeExecute(otherTask);
                    }
                }
            }

Domain

Subdomains

Frequently Asked Questions

What does mainLoop() do?
mainLoop() is a function in the netty codebase, defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/ManualEventLoopTest.java.
Where is mainLoop() defined?
mainLoop() is defined in transport-native-epoll/src/test/java/io/netty/channel/epoll/ManualEventLoopTest.java at line 188.
What does mainLoop() call?
mainLoop() calls 1 function(s): safeExecute.
What calls mainLoop()?
mainLoop() is called by 1 function(s): ManualIoEventLoopRunner.

Analyze Your Own Codebase

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

Try Supermodel Free