فهرست منبع

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

Francesco Nigro 2 سال پیش
والد
کامیت
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);