Ver código fonte

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

Francesco Nigro 2 anos atrás
pai
commit
a4029fc9cd

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

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