Multi-core event loop group
This commit is contained in:
parent
34ff4bf9a2
commit
e580f80384
@ -71,7 +71,7 @@ public class GrpcServer extends Server {
|
|||||||
EventLoopGroup elg;
|
EventLoopGroup elg;
|
||||||
Class<? extends ServerChannel> channelType;
|
Class<? extends ServerChannel> channelType;
|
||||||
try {
|
try {
|
||||||
elg = new EpollEventLoopGroup(1);
|
elg = new EpollEventLoopGroup(Math.min(8, Runtime.getRuntime().availableProcessors()));
|
||||||
channelType = EpollServerDomainSocketChannel.class;
|
channelType = EpollServerDomainSocketChannel.class;
|
||||||
} catch (UnsatisfiedLinkError ex) {
|
} catch (UnsatisfiedLinkError ex) {
|
||||||
elg = new NioEventLoopGroup();
|
elg = new NioEventLoopGroup();
|
||||||
|
Loading…
Reference in New Issue
Block a user