1. Pool is a common way to improve performance. Sometimes creating and destroying some resources is a very time-consuming behavior. We will consider putting some resources in a pool, taking them when they are used, adding them when they are not enough, and returning them when they are exhausted, so that you can avoid the constant creation and destruction of resources.
Applications and Ranges
A large number of threads are required to complete the task, and the time to complete the task is shorter.
Applications that are more demanding in performance. such as requiring the server to respond quickly to customer requests.
3, accept a sudden large number of requests, but not so that the server resulting in a large number of threading applications. Sudden large number of customer requests, in the absence of a thread pool, will generate a large number of threads, although theoretically most of the operating system threads maximum is not a problem, a short period of time to produce a large number of threads may cause memory to reach the limit, and the "OutOfMemory" error occurs.
Thread pool Threadpool (need to be supplemented)