Differentiate synchronous and asynchronous error of an AIO operation

Alan Bateman Alan.Bateman at oracle.com
Tue Jun 14 12:01:10 PDT 2011


Zhong Yu wrote:
> :
> That means the user provided executor service will only be used for
> completion handlers? That's great. However this is not guaranteed by
> the javadoc
It's not guaranteed by the javadoc as it has to allow for different 
implementations and configurations. As I mentioned, when a group is 
created with a fixed thread pool then the tasks are long running tasks 
that run a loop that dequeues events and dispatches to completion 
handlers. When created with other thread pools then the tasks are simple 
tasks that mostly just invoke the completion handler. There are a couple 
of exceptions though. For example on editions of Windows that don't 
support thread agnostic I/O then we have to initiate the I/O operations 
on pooled threads and so a task may be executed to initiate the I/O 
operation. I will guess that tasks like this will complicate your approach.

-Alan.


More information about the nio-dev mailing list