How to use setThreadPool() in Jetty

前端 未结 2 1096
暗喜
暗喜 2021-01-23 04:10

I wanted to see how to use the setThreadPool() functionality. Let\'s say my main class is the following:

import javax.servlet.SingleThreadModel;
imp         


        
2条回答
  •  轮回少年
    2021-01-23 04:21

    Here is an example:

    QueuedThreadPool threadPool = new QueuedThreadPool();
    threadPool.setMaxThreads(5);
    server.setThreadPool(threadPool);
    

提交回复
热议问题