Extension: Eager Thread Pool (#1568)

* Extension: Enhanced Thread Pool
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.

* remove * in import

* add license to fix ci failure

* rename the thread pool to EagerThreadPool
modify sth with the code review
format the code file

* remove '*' in import statement

* throw NullPointerException if the param is null.

* throw NullPointerException if the param is null.

* catch throwable and decrease submitted task count anyway
6 files changed
tree: b4d21a46c1016b863b5792d4c15f52af24c327d2
  1. all/
  2. bom/
  3. codestyle/
  4. dependencies-bom/
  5. dubbo-cluster/
  6. dubbo-common/
  7. dubbo-config/
  8. dubbo-container/
  9. dubbo-demo/
  10. dubbo-filter/
  11. dubbo-monitor/
  12. dubbo-plugin/
  13. dubbo-registry/
  14. dubbo-remoting/
  15. dubbo-rpc/
  16. dubbo-serialization/
  17. dubbo-test/
  18. hessian-lite/
  19. .gitignore
  20. .travis.yml
  21. CODE_OF_CONDUCT.md
  22. CONTRIBUTING.md
  23. DISCLAIMER
  24. LICENSE
  25. NOTICE
  26. pom.xml
  27. PULL_REQUEST_TEMPLATE.md
  28. README.md
README.md

Apache Dubbo (incubating) Project

Build Status codecov Gitter license maven

Apache Dubbo (incubating) is a high-performance, java based RPC framework open-sourced by Alibaba. Please visit dubbo official site for quick start and other information.

We are now collecting dubbo user info in order to help us to improve dubbo better, pls. kindly help us by providing yours on issue#1012: Wanted: who's using dubbo, thanks :)

Links