Multithreading - thread pool

illustrate:

  In order to prevent the system from frequently creating and destroying threads, we can reuse the created threads, so a thread pool is needed.
There are always several active threads in the thread pool. When you need to use a thread, you can take an idle thread from the pool. When the work is completed,
the thread is not closed, but the thread is returned to the pool for the convenience of others. reuse.

 

accomplish:

  JDK provides a set of Executor frameworks for thread pools to help developers effectively control thread pools.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324607118&siteId=291194637