The default size of the services' Thread Pool(Fixed) is `100` in user doc, but 
the source code of `FixedThreadPool` is `200`. There are inconsistent.

#### 1. desc of user doc
`dubbo-protocol.md`,`dubbo-provider.md`
```
| 属性 | 对应URL参数 | 类型 | 是否必填 | 缺省值 | 作用 | 描述 | 兼容性 |
| threads | threads | int | 可选 | 100 | 性能调优 | 服务线程池大小(固定大小) | 2.0.5以上版本 |

| Attribute     | Corresponding URL parameter | Type           | Required    | 
Default Value                            | Function                  | 
Description                              | Compatibility |
| threads       | threads                     | int            | False       | 
100                                      | Performance optimize      | The size 
of the services' Thread Pool(Fixed) | Above 2.0.5   |
```

#### 2. source code of FixedThreadPool
org.apache.dubbo.common.Constants
```java
    public static final String DEFAULT_THREAD_NAME = "Dubbo";

    public static final int DEFAULT_CORE_THREADS = 0;

    public static final int DEFAULT_THREADS = 200;
```

org.apache.dubbo.common.threadpool.support.fixed.FixedThreadPool
```java
public class FixedThreadPool implements ThreadPool {

    @Override
    public Executor getExecutor(URL url) {
        String name = url.getParameter(Constants.THREAD_NAME_KEY, 
Constants.DEFAULT_THREAD_NAME);
        int threads = url.getParameter(Constants.THREADS_KEY, 
Constants.DEFAULT_THREADS);
        int queues = url.getParameter(Constants.QUEUES_KEY, 
Constants.DEFAULT_QUEUES);
        return new ThreadPoolExecutor(threads, threads, 0, 
TimeUnit.MILLISECONDS,
                queues == 0 ? new SynchronousQueue<Runnable>() :
                        (queues < 0 ? new LinkedBlockingQueue<Runnable>()
                                : new LinkedBlockingQueue<Runnable>(queues)),
                new NamedInternalThreadFactory(name, true), new 
AbortPolicyWithReport(name, url));
    }

}
```



[ Full content available at: 
https://github.com/apache/incubator-dubbo-docs/issues/43 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to