Home / Function/ invokeLater() — netty Function Reference

invokeLater() — netty Function Reference

Architecture documentation for the invokeLater() function in AbstractChannel.java from the netty codebase.

Function java Buffer Search calls 1 called by 5

Entity Profile

Dependency Diagram

graph TD
  b76c888c_4df5_fe91_84fb_25d571b70e8a["invokeLater()"]
  330d05c9_85ca_2e57_92f5_e996fb442b81["AbstractUnsafe"]
  b76c888c_4df5_fe91_84fb_25d571b70e8a -->|defined in| 330d05c9_85ca_2e57_92f5_e996fb442b81
  12b196ff_bea6_a14a_f304_feba219fd5ac["bind()"]
  12b196ff_bea6_a14a_f304_feba219fd5ac -->|calls| b76c888c_4df5_fe91_84fb_25d571b70e8a
  49488e5c_2130_0f61_1882_15fe94cba0eb["disconnect()"]
  49488e5c_2130_0f61_1882_15fe94cba0eb -->|calls| b76c888c_4df5_fe91_84fb_25d571b70e8a
  3247fe36_e8dd_2a94_aca8_58f72f5210e8["close()"]
  3247fe36_e8dd_2a94_aca8_58f72f5210e8 -->|calls| b76c888c_4df5_fe91_84fb_25d571b70e8a
  9ad9bf60_0964_2452_be57_46e52a311467["deregister()"]
  9ad9bf60_0964_2452_be57_46e52a311467 -->|calls| b76c888c_4df5_fe91_84fb_25d571b70e8a
  64ffc4ac_efb7_a405_54dc_2d1b3d7fab48["beginRead()"]
  64ffc4ac_efb7_a405_54dc_2d1b3d7fab48 -->|calls| b76c888c_4df5_fe91_84fb_25d571b70e8a
  3247fe36_e8dd_2a94_aca8_58f72f5210e8["close()"]
  b76c888c_4df5_fe91_84fb_25d571b70e8a -->|calls| 3247fe36_e8dd_2a94_aca8_58f72f5210e8
  style b76c888c_4df5_fe91_84fb_25d571b70e8a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/AbstractChannel.java lines 874–891

        private void invokeLater(Runnable task) {
            try {
                // This method is used by outbound operation implementations to trigger an inbound event later.
                // They do not trigger an inbound event immediately because an outbound operation might have been
                // triggered by another inbound event handler method.  If fired immediately, the call stack
                // will look like this for example:
                //
                //   handlerA.inboundBufferUpdated() - (1) an inbound handler method closes a connection.
                //   -> handlerA.ctx.close()
                //      -> channel.unsafe.close()
                //         -> handlerA.channelInactive() - (2) another inbound handler method called while in (1) yet
                //
                // which means the execution of two inbound handler methods of the same handler overlap undesirably.
                eventLoop().execute(task);
            } catch (RejectedExecutionException e) {
                logger.warn("Can't invoke task later as EventLoop rejected it", e);
            }
        }

Domain

Subdomains

Calls

Frequently Asked Questions

What does invokeLater() do?
invokeLater() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/AbstractChannel.java.
Where is invokeLater() defined?
invokeLater() is defined in transport/src/main/java/io/netty/channel/AbstractChannel.java at line 874.
What does invokeLater() call?
invokeLater() calls 1 function(s): close.
What calls invokeLater()?
invokeLater() is called by 5 function(s): beginRead, bind, close, deregister, disconnect.

Analyze Your Own Codebase

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

Try Supermodel Free