当前位置:网站首页>Detailed explanation of the underlying principle of concurrent thread pool and source code analysis

Detailed explanation of the underlying principle of concurrent thread pool and source code analysis

2022-06-22 08:13:00 Hide on jdk

1. The order in which the underlying tasks of the thread pool are stored : Queue commit priority , Non core thread pool execution takes precedence

Suppose the core thread pool size is 10, The queue size is 10, The non core thread pool size is 10

The execution process is shown in the following figure :1. First, execute the tasks of the core thread pool , Then perform the task of charging the core thread pool , Finally, perform the task of the team , If the queue is full , A reject policy is executed .

Thread pool processing flow : It is the above process .

 

原网站

版权声明
本文为[Hide on jdk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220808562076.html