任何人都可以帮助我理解netty4.0.15中的以下线程块
nioEventLoopGroup-5-13 [BLOCKED] CPU time: 38s
sun.nio.ch.SelectorImpl.select(long)
io.netty.channel.nio.NioEventLoop.select()
io.netty.channel.nio.NioEventLoop.run()
io.netty.util.concurrent.SingleThreadEventExecutor$2.run()
java.lang.Thread.run()
nioEventLoopGroup-5-2 [BLOCKED] CPU time: 40s
java.lang.Class.isAnnotationPresent(Class)
io.netty.channel.ChannelHandlerAdapter.isSharable()
io.netty.channel.DefaultChannelPipeline.checkMultiplicity(ChannelHandlerContext)
io.netty.channel.DefaultChannelPipeline.addLast0(String, DefaultChannelHandlerContext)
io.netty.channel.DefaultChannelPipeline.addLast(EventExecutorGroup, String, ChannelHandler)
io.netty.channel.DefaultChannelPipeline.addLast(String, ChannelHandler)
org.zestadz.adsearch.server.impl.KomliAdServerInitializer.initChannel(SocketChannel)
org.zestadz.adsearch.server.impl.KomliAdServerInitializer.initChannel(Channel)
io.netty.channel.ChannelInitializer.channelRegistered(ChannelHandlerContext)
io.netty.channel.DefaultChannelHandlerContext.invokeChannelRegistered()
io.netty.channel.DefaultChannelHandlerContext.fireChannelRegistered()
io.netty.channel.DefaultChannelPipeline.fireChannelRegistered()
io.netty.channel.AbstractChannel$AbstractUnsafe.register0(ChannelPromise)
io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel$AbstractUnsafe, ChannelPromise)
io.netty.channel.AbstractChannel$AbstractUnsafe$1.run()
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(long)
io.netty.channel.nio.NioEventLoop.run()
io.netty.util.concurrent.SingleThreadEventExecutor$2.run()
java.lang.Thread.run()
我从yourkit profiler中删除了阻止的线程
答案 0 :(得分:2)
这是正常的,工作人员阻止select()等待传入消息