According to https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java there is a statement saying that if the acceptorThreadCount is 0, it is being set to 1 since NIO2 does not allow any form of IO concurrency. Setting the acceptorThreadCount to 2 in server.xml will throw an error ("Socket accept failed"). Wouldn't it be better to change the code // Initialize thread count defaults for acceptor, poller if (acceptorThreadCount == 0) { // NIO2 does not allow any form of IO concurrency acceptorThreadCount = 1; } into // Initialize thread count defaults for acceptor, poller if (acceptorThreadCount != 1) { // NIO2 does not allow any form of IO concurrency acceptorThreadCount = 1; } to avoid this behaviour? Thanks, Oliver
This looks like a good idea, and it will be included in 8.0.24.