Search in sources :

Example 1 with NamedThreadFactory

use of com.blade.kit.NamedThreadFactory in project blade by biezhi.

the class EpollKit method group.

static NettyServerGroup group(int threadCount, int workers) {
    var bossGroup = new EpollEventLoopGroup(threadCount, new NamedThreadFactory("epoll-boss@"));
    var workerGroup = new EpollEventLoopGroup(workers, new NamedThreadFactory("epoll-worker@"));
    return NettyServerGroup.builder().boosGroup(bossGroup).workerGroup(workerGroup).socketChannel(EpollServerSocketChannel.class).build();
}
Also used : EpollServerSocketChannel(io.netty.channel.epoll.EpollServerSocketChannel) lombok.var(lombok.var) EpollEventLoopGroup(io.netty.channel.epoll.EpollEventLoopGroup) NamedThreadFactory(com.blade.kit.NamedThreadFactory)

Aggregations

NamedThreadFactory (com.blade.kit.NamedThreadFactory)1 EpollEventLoopGroup (io.netty.channel.epoll.EpollEventLoopGroup)1 EpollServerSocketChannel (io.netty.channel.epoll.EpollServerSocketChannel)1 lombok.var (lombok.var)1