Skip to content

Commit

Permalink
drv: use dedicated thread pool for notifications and callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
kofemann committed Aug 15, 2024
1 parent f959703 commit a9ee73b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import ch.cern.cta.rpc.CtaRpcGrpc.CtaRpcBlockingStub;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.dcache.namespace.FileAttribute;
import org.dcache.nearline.cta.xrootd.DataMover;
Expand Down Expand Up @@ -480,7 +481,8 @@ public void start() {
.channelType(NioSocketChannel.class) // use Nio event loop instead of epoll
.eventLoopGroup(new NioEventLoopGroup(0,
new ThreadFactoryBuilder().setNameFormat("cta-grpc-worker-%d").build()))
.directExecutor() // use netty threads
.executor(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()*2,
new ThreadFactoryBuilder().setNameFormat("cta-grpc-callback-runner-%d").build()))
.build();

cta = CtaRpcGrpc.newBlockingStub(channel);
Expand Down

0 comments on commit a9ee73b

Please sign in to comment.