executor for AsynchronousFileChannel.open()
Zhong Yu
zhong.j.yu at gmail.com
Fri Mar 30 22:02:18 PDT 2012
Hi there,
Suppose I have 100 asyn file channels for reading (concurrently). All
my completion handlers are non-blocking and short. What kind of
executor is best for AsynchronousFileChannel.open()?
My initial choice was a ThreadPoolExecutor with maximumPoolSize==P
where P is the number of processors, because it would be less
efficient to have more than P threads executing non-blocking tasks
(i.e. completion handlers).
However the javadoc of AsynchronousFileChannel.open() states that
there could be other kinds of tasks submitted to the executor, and the
nature of these tasks are unclear. Then I'm lost.
Any advice on an appropriate executor for my specific use case?
Thanks,
Zhong Yu
More information about the nio-dev
mailing list