mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-19 20:15:46 +00:00
perf[thread]: increase the event threads
This commit is contained in:
1 parent
4a35397432
commit
5dc92cfd5a
1 file changed
+1
-1
@@ -45,7 +45,7 @@ public abstract class EventBus {
|
|||||||
* EN: The size of the thread pool. Event's thread pool is often used to do time-consuming operations, so set it a little bigger
|
* EN: The size of the thread pool. Event's thread pool is often used to do time-consuming operations, so set it a little bigger
|
||||||
* CN: 线程池的大小. event的线程池经常用来做一些耗时的操作,所以要设置大一点
|
* CN: 线程池的大小. event的线程池经常用来做一些耗时的操作,所以要设置大一点
|
||||||
*/
|
*/
|
||||||
private static final int EXECUTORS_SIZE = Runtime.getRuntime().availableProcessors() * 2;
|
private static final int EXECUTORS_SIZE = Runtime.getRuntime().availableProcessors() * 2 + 1;
|
||||||
|
|
||||||
private static final ExecutorService[] executors = new ExecutorService[EXECUTORS_SIZE];
|
private static final ExecutorService[] executors = new ExecutorService[EXECUTORS_SIZE];
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user