Netty源码解析-EventLoopGroup

1.EventLoopGroup类结构

Netty源码解析-EventLoopGroup

重点:继承了ScheduledExecutorService类

2.NioEventLoopGroup类结构

Netty源码解析-EventLoopGroup

核心代码
NioEventLoopGroup构造方法:确定线程数
MultithreadEventExecutorGroup构造器:确定executor = new ThreadPerTaskExecutor(newDefaultThreadFactory());
children = new EventExecutor[nThreads];

相关推荐