https://bz.apache.org/bugzilla/show_bug.cgi?id=57936

            Bug ID: 57936
           Summary: Wrong handling of acceptorThreadCount
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: oli...@kant.net

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to