Hi, all
I have read this article
http://mina.apache.org/configuring-thread-model.html
http://mina.apache.org/configuring-thread-model.html . At the end of the
article, author suggest us not share one thread pool for IoServices and
ExecutorFilters, and better to use a cached thread pool for IoServices.
Is that means if I add only one thread pool to IoFilterChain, then the I/O
processor would acquire a thread from the shared pool? So, adding two thread
pools would be OK? like below.
SocketAcceptorConfig config = (SocketAcceptorConfig)
acceptor.getDefaultConfig();
config.setThreadModel(ThreadModel.MANUAL);
ExecutorService executor1 = Executors.newCachedThreadPool();
config.getFilterChain().addLast("pool1", new ExecutorFilter(executor1));
ExecutorService executor2 = Executors.newCachedThreadPool();
config.getFilterChain().addLast("pool2", new ExecutorFilter(executor2));
Am I right? if wrong, how?
thx a lot!
--
View this message in context:
http://www.nabble.com/How-could-I-set-thread-pool-for-IoServices-and-ExecutorFilters--tf3882251.html#a11003189
Sent from the mina dev mailing list archive at Nabble.com.