Просмотр исходного кода

Reduce the number of event loop threads for io_uring (#8231)

Francesco Nigro 2 лет назад
Родитель
Сommit
a4029fc9cd
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      frameworks/Java/netty/src/main/java/hello/HelloWebServer.java

+ 1 - 1
frameworks/Java/netty/src/main/java/hello/HelloWebServer.java

@@ -37,7 +37,7 @@ public class HelloWebServer {
 	public void run() throws Exception {
 		// Configure the server.
 		if (IOUring.isAvailable()) {
-			doRun(new IOUringEventLoopGroup(), IOUringServerSocketChannel.class, IoMultiplexer.IO_URING);
+			doRun(new IOUringEventLoopGroup(Runtime.getRuntime().availableProcessors()), IOUringServerSocketChannel.class, IoMultiplexer.IO_URING);
 		} else
 			if (Epoll.isAvailable()) {
 			doRun(new EpollEventLoopGroup(), EpollServerSocketChannel.class, IoMultiplexer.EPOLL);