AsynchronousDatagramChannel read/write spec issue

Umashankar Umashankar.Ningaiah at Sun.COM
Mon Mar 9 02:57:30 PDT 2009


Hi Alan,
 AsynchronousDatagramChannel specification class description says 
"Asynchronous datagram channels allow more than one read/receive and 
write/send to be outstanding at any given time. ". This statement seems 
to contradict the  AsynchronousDatagramChannel.read() method 
specification which says "If a thread initiates a read operation before 
a previous read operation has completed then a ReadPendingException will 
be thrown.  "  and  AsynchronousDatagramChannel.write() method spec 
which says "If a thread initiates a write operation before a previous 
write operation has completed then a WritePendingException will be thrown."

Could you please clarify this.

Thanks,
Umashankar






More information about the nio-dev mailing list