Skip to content

Commit

Permalink
perf[thread]: increase the event threads
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Feb 23, 2024
1 parent 4a35397 commit 5dc92cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion event/src/main/java/com/zfoo/event/manager/EventBus.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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];

Expand Down

0 comments on commit 5dc92cf

Please sign in to comment.