Is the thread started when tomcat concurrency the same as the thread in the program?

I feel as if the threads started by tomcat take up more resources and are directly related to throughput, so now using nio mode to return Tomcat threads as soon as possible to provide concurrency, is that what I understand?

Jun.08,2022

/**
 * Same as a java.util.concurrent.ThreadPoolExecutor but implements a much more efficient
 * {@link -sharpgetSubmittedCount()} method, to be used to properly handle the work queue.
 * If a RejectedExecutionHandler is not specified a default one will be configured
 * and that one will always throw a RejectedExecutionException
 *
 */

tomcat's thread pool object, also called ThreadPoolExecutor, inherits jdk's java.util.concurrent.ThreadPoolExecutor, but it implements an efficient method, getSubmittedCount (), to handle work queues.
you can see the source code of several classes under the org.apache.tomcat.util.threads package.


one thing. The
servlet specification stipulates that each request needs to be processed by a separate thread.


the first floor is quite right. When you encounter this kind of problem in the future, you are not busy asking questions, but look at the source code and solve the problem from the source code.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e6e6e0-1dc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e6e6e0-1dc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?