apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.42k stars 26.41k forks source link

[Discussion] There are so much threadpool, can we merge some threadpool into one threadpool ? #3616

Open cvictory opened 5 years ago

cvictory commented 5 years ago

There are so much threadpool that manage only one thread , and this thread is idle. The threadpool as follow:

There are so much situation that we will use threadpool. I think can we merge this threadpool to make the threadpool is used by much more situation.

Also we should move some timer task to HashedWheelTimer?

carryxyh commented 5 years ago

good suggestion. But what I need to remind is

  1. hashedwheeltimer only have one thread executes the task.
  2. If the previous task takes a long time to execute, it will affect the execution of subsequent tasks.

I suggest that we can first consider the transformation of the hashedWheelTimer, such as using the thread pool internally to perform tasks.

carryxyh commented 5 years ago

By the way, I will bring this topic to mailing list. A very worthwhile issue.