Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在vertx 文档中,他们提到有可能限制每个 vertx 实例的事件循环线程数:
每个 Vertx 实例都维护多个事件循环,而不是单个事件循环。默认情况下,我们根据机器上可用内核的数量来选择数字,但这可以被覆盖。
也许有人知道该怎么做?(我需要它用于调试目的)
Vertx vertx = Vertx.vertx(new VertxOptions().setEventLoopPoolSize(1));
默认情况下是:
public static final int DEFAULT_EVENT_LOOP_POOL_SIZE = 2 * Runtime.getRuntime().availableProcessors();