Browse Source

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

Francesco Nigro 2 years ago
parent
commit
a4029fc9cd
1 changed files with 1 additions and 1 deletions
  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);