Multi-core event loop group

This commit is contained in:
Andrea Cavalli 2024-09-26 23:55:20 +02:00
parent 34ff4bf9a2
commit e580f80384

View File

@ -71,7 +71,7 @@ public class GrpcServer extends Server {
EventLoopGroup elg;
Class<? extends ServerChannel> channelType;
try {
elg = new EpollEventLoopGroup(1);
elg = new EpollEventLoopGroup(Math.min(8, Runtime.getRuntime().availableProcessors()));
channelType = EpollServerDomainSocketChannel.class;
} catch (UnsatisfiedLinkError ex) {
elg = new NioEventLoopGroup();