Home / Function/ execute() — netty Function Reference

execute() — netty Function Reference

Architecture documentation for the execute() function in ImmediateEventExecutor.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  64b99185_12ad_70d8_77c2_6ad84bec4984["execute()"]
  e920a029_e6b0_2304_5fdf_97b074b8a950["ImmediateEventExecutor"]
  64b99185_12ad_70d8_77c2_6ad84bec4984 -->|defined in| e920a029_e6b0_2304_5fdf_97b074b8a950
  style 64b99185_12ad_70d8_77c2_6ad84bec4984 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/concurrent/ImmediateEventExecutor.java lines 104–128

    @Override
    public void execute(Runnable command) {
        ObjectUtil.checkNotNull(command, "command");
        if (!RUNNING.get()) {
            RUNNING.set(true);
            try {
                command.run();
            } catch (Throwable cause) {
                logger.info("Throwable caught while executing Runnable {}", command, cause);
            } finally {
                Queue<Runnable> delayedRunnables = DELAYED_RUNNABLES.get();
                Runnable runnable;
                while ((runnable = delayedRunnables.poll()) != null) {
                    try {
                        runnable.run();
                    } catch (Throwable cause) {
                        logger.info("Throwable caught while executing Runnable {}", runnable, cause);
                    }
                }
                RUNNING.set(false);
            }
        } else {
            DELAYED_RUNNABLES.get().add(command);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does execute() do?
execute() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/concurrent/ImmediateEventExecutor.java.
Where is execute() defined?
execute() is defined in common/src/main/java/io/netty/util/concurrent/ImmediateEventExecutor.java at line 104.

Analyze Your Own Codebase

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

Try Supermodel Free