AsynchronousFileChannel.open seems to miss AsynchronousChannelGroup

Maxim Mossienko maxim.mossienko at gmail.com
Thu Dec 15 04:48:29 PST 2011


Hi, All

AsynchronousFileChannel.open() seems to miss AsynchronousChannelGroup
as parameter, the method accepts only ExecutorService.
When I invoke AsynchronousFileChannel.open with my own executor
service for many files, each time a new Iocp (AsynchronousChannelGroup
group implementation on Windows) instance is created with one thread
per request. If I read 1000 files, this will create 1000 of
short-lived threads. For such bulk file operation I created
AsyncChannelGroup with fixed thread pool and see no way to use it. It
looks like API problem.

Best, Maxim Mossienko


More information about the nio-dev mailing list