You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/04/08 09:22:02 UTC

[GitHub] carryxyh opened a new pull request #1568: Extension: Enhanced Thread Pool

carryxyh opened a new pull request #1568: Extension: Enhanced Thread Pool
URL: https://github.com/apache/incubator-dubbo/pull/1568
 
 
   A thread pool that can provide faster processing speeds when there are more tasks (of course it consumes more resources)
   * When the number of tasks exceeds the core size, a new thread is first started to execute the task instead of putting it into the queue.
   * When the number of tasks is lower than the core size for a long time, the core size threads are maintained and redundant threads are recycled.
   * Compared to the fixed pool:When there are more tasks, provide more workers to handle the tasks.
   * Compared to the cached pool:The task queue in the cached pool is actually a SynchronousQueue and does not have the ability to cache tasks.
   * Whether to fail fail or put into a queue when a thread runs out:Both are feasible and need to consider which way should be applied according to the business scenario. Delayed scenarios are not allowed. Failfast is more reasonable than queues. However, if there is a certain tolerance for delays, queues are more reasonable than failfast.
   * Reference: Tomcat's thread pool design
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services