1
1
/*
2
- * Copyright (c) 2011-2024 VMware, Inc. or its affiliates, All Rights Reserved.
2
+ * Copyright (c) 2011-2025 VMware, Inc. or its affiliates, All Rights Reserved.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
23
23
import java .util .concurrent .atomic .AtomicReference ;
24
24
25
25
import io .netty .channel .EventLoopGroup ;
26
- import io .netty .channel .nio .NioEventLoopGroup ;
26
+ import io .netty .channel .MultiThreadIoEventLoopGroup ;
27
+ import io .netty .channel .nio .NioIoHandler ;
27
28
import io .netty .util .concurrent .FastThreadLocalThread ;
28
29
import io .netty .util .concurrent .Future ;
29
30
import reactor .core .publisher .Mono ;
@@ -195,8 +196,9 @@ EventLoopGroup cacheNioSelectLoops() {
195
196
196
197
EventLoopGroup eventLoopGroup = serverSelectLoops .get ();
197
198
if (null == eventLoopGroup ) {
198
- EventLoopGroup newEventLoopGroup = new NioEventLoopGroup (selectCount ,
199
- threadFactory (this , "select-nio" ));
199
+ EventLoopGroup newEventLoopGroup = new MultiThreadIoEventLoopGroup (selectCount ,
200
+ threadFactory (this , "select-nio" ),
201
+ NioIoHandler .newFactory ());
200
202
if (!serverSelectLoops .compareAndSet (null , newEventLoopGroup )) {
201
203
//"FutureReturnValueIgnored" this is deliberate
202
204
newEventLoopGroup .shutdownGracefully (0 , 0 , TimeUnit .MILLISECONDS );
@@ -210,8 +212,9 @@ EventLoopGroup cacheNioSelectLoops() {
210
212
EventLoopGroup cacheNioServerLoops () {
211
213
EventLoopGroup eventLoopGroup = serverLoops .get ();
212
214
if (null == eventLoopGroup ) {
213
- EventLoopGroup newEventLoopGroup = new NioEventLoopGroup (workerCount ,
214
- threadFactory (this , "nio" ));
215
+ EventLoopGroup newEventLoopGroup = new MultiThreadIoEventLoopGroup (workerCount ,
216
+ threadFactory (this , "nio" ),
217
+ NioIoHandler .newFactory ());
215
218
if (!serverLoops .compareAndSet (null , newEventLoopGroup )) {
216
219
//"FutureReturnValueIgnored" this is deliberate
217
220
newEventLoopGroup .shutdownGracefully (0 , 0 , TimeUnit .MILLISECONDS );
0 commit comments