public final class DefaultExecutorServiceFactory extends Object implements ExecutorServiceFactory
ExecutorServiceFactorythat creates a new
ForkJoinPoolon each call to
ExecutorServiceFactory powers Netty's nio and epoll eventloops by default. Netty moved from managing its
own threads and pinning a thread to each eventloop to an
Executor-based approach. That way advanced
users of Netty can plug in their own threadpools and gain more control of scheduling the eventloops.
The main reason behind choosing a
ForkJoinPool as the default
Executor is that it uses
thread-local task queues, providing a high level of thread affinity to Netty's eventloops.
The whole discussion can be found on GitHub https://github.com/netty/netty/issues/2250.
|Constructor and Description|
public DefaultExecutorServiceFactory(Class<?> clazzNamePrefix)
clazzNamePrefix- the name of the class will be used to prefix the name of each
public DefaultExecutorServiceFactory(String namePrefix)
namePrefix- the string to prefix the name of each
Copyright © 2008–2015 The Netty Project. All rights reserved.