code: private void configureWorkerThreads(@NotNull NetworkListener networkListener) {
          //WorkerThreadIOStrategy is the default anyway.
          //networkListener.getTransport().setIOStrategy(WorkerThreadIOStrategy.getInstance());
  
          ThreadPoolConfig config = ThreadPoolConfig.defaultConfig(); //makes a copy
          int numThreads = Runtime.getRuntime().availableProcessors() * 2;
          //setting core and max to the same number is important!
          config.setCorePoolSize(numThreads);
          config.setMaxPoolSize(numThreads);
          //a queue limit is optional but recommended
          config.setQueueLimit(1000);
          networkListener.getTransport().setWorkerThreadPoolConfig(config);
      }
docs: See https://grizzly.java.net/coreconfig.html
  See https://grizzly.java.net/bestpractices.html