title: Is a custom executor for NioEventLoopGroup dangerous?
body: <p>I want to reuse the thread pool of my worker threads in the NioEventLoopGroup of my server bootstrap.</p>
  
  <p>The <a href="https://netty.io/4.1/api/io/netty/channel/nio/NioEventLoopGroup.html#NioEventLoopGroup-int-java.util.concurrent.Executor-" rel="nofollow noreferrer">NioEventLoopGroup interface</a> offers to use a custom executor. I'm worried to use it, because the default executor is a <a href="https://netty.io/4.1/xref/io/netty/util/concurrent/MultithreadEventExecutorGroup.html#75" rel="nofollow noreferrer">special implementation</a>:</p>
  
  <pre><code>if (executor == null) {
      executor = new ThreadPerTaskExecutor(this.newDefaultThreadFactory());
  }
  </code></pre>
  
  <p>The netty people usually don't write implementations without a reason. That's why I'm not sure if using a simple thread pool has any disadvantages.</p>