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?
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?
/**
* 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.
Previous: How does ios receive real-time images through wifi external cameras?
Next: What will happen to the software world if one day warehouse sites like packagist and mvn get cold?