On Tue, Jul 22, 2003 at 01:10:24PM +0200, Jos Visser wrote: > Lots of Java programs simulate AIO by using threads. Almost all Java IO > mechanisms are blocking and this means that doing interesting work while > the IO is in progress requires some mechanism that involves a separate > thread with a callback routine.
This is not AIO. I am using "asynchronous I/O" (AIO) to refer to interrupt-driven facilities such as the Unix aio_*() syscalls. (I recognize that it is not uncommon to refer to non-blocking IO as asynchronous IO, but I believe that I have been careful about clearly defining terms in this thread.) The standard Java libraries perform blocking IO dispatched from threads. Some Java programs, as you say, build a single-threaded, non-blocking, event-dispatched IO mechanism on top of this. Java does not, however, have any support for interrupts; it is not possible to do AIO in Java. - Damien