Thread pool Threadpool (need to be supplemented)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.